报错信息
Error creating bean with name ‘entityManagerFactory‘ defined in class path resource[...]
在做双数据源的时候报上面错误
解决:
1.spring.datasource.url 改为 spring.datasource.jdbc-url
2.
@SpringBootApplication(
exclude = {
DataSourceAutoConfiguration.class
}
)
这个注解去除掉默认的数据库配置
3.包冲突,排除自带低版本的包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
<exclusions>
<exclusion>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
</exclusion>
</exclusions>
</dependency>