小编use*_*756的帖子

Spring Boot 2 使用 JPA 升级无法实例化 [com.zaxxer.hikari.HikariDataSource]

我正在升级到 Spring Boot 2.0.1.RELEASE,使用 Spring data JPA 和 Eclipselink 作为我的提供程序和 Liquibase。我在尝试启动服务器时遇到以下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/zoomdata/scheduler/service/dao/JPASpringConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Illegal arguments to factory method 'dataSource'; args: ; nested exception is java.lang.IllegalArgumentException: wrong number of arguments
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1702)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
    at …
Run Code Online (Sandbox Code Playgroud)

java spring spring-boot hikaricp

7
推荐指数
1
解决办法
4万
查看次数

标签 统计

hikaricp ×1

java ×1

spring ×1

spring-boot ×1