springboot2.0.2错误:Caused by: java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName.
原创    exception    发表于:2018-10-17 10:46:38
  阅读 :286   收藏   编辑

console:

Caused by: java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName.
at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:1059)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:109)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336)
at org.apache.ibatis.executor.ReuseExecutor.prepareStatement(ReuseExecutor.java:88)
at org.apache.ibatis.executor.ReuseExecutor.doUpdate(ReuseExecutor.java:51)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
... 42 more

2.0.x版多数据源是连接数据库改为:

“primary”为区分多个连接

spring.datasource.primary.driver-class-name=
spring.datasource.primary.jdbc-url=
spring.datasource.primary.username=root
spring.datasource.primary.password=root


评论
条评论