【发布时间】:2020-04-05 12:07:21
【问题描述】:
我正在尝试使用 github CI 部署我的应用程序。我的配置文件是应用程序默认的,它在尝试获取与数据库的连接时会产生错误。
我的工作流程是:
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup PostgreSQL
uses: Harmon758/postgresql-action@v1.0.0
- name: Build with Maven
run: mvn -B package --file pom.xml
部署中产生错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution
【问题讨论】:
标签: java spring github continuous-integration devops