相关疑难解决方法(0)

Spring Boot 2.0迁移之后:driverClassName需要jdbcUrl

已解决: 我的解决方案:我从DatabaseConfig.java中删除了dataSource()方法.然后,应用程序成功启动:)

我刚刚将Spring Boot项目从1.5.x更新到2.0.0.在更新之前,此应用程序正常工作但在更新后,我收到的一些错误如下.有什么问题,你能帮帮我吗?

我在项目中使用PostgreSQL,Hibernate,JPA.

我也试过这个,但它对我不起作用.

谢谢你的时间 :)

这是问题:

2018-03-03 23:19:37.934 ERROR 42323 --- [           main] com.zaxxer.hikari.HikariConfig           : HikariPool-1 - dataSource or dataSourceClassName or jdbcUrl is required.
2018-03-03 23:19:37.938  WARN 42323 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating …
Run Code Online (Sandbox Code Playgroud)

java spring spring-boot

46
推荐指数
6
解决办法
6万
查看次数

标签 统计

java ×1

spring ×1

spring-boot ×1