spring boot 启动报If you want an embedded database please put a supported one on the classpath
程序员文章站
2022-04-19 22:33:36
...
spring boot 会默认加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration 这个类DataSourceAutoConfiguration类使用了@Configuration注解向spring注入dataSource bean。若没有dataSource相关的配置信息,当spring创建dataSource bean找不到配置信息就会报错。
解决办法发是:
在Application类上增加
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
推荐阅读
-
If you want an embedded database please put a supported one on the classpath
-
cloud 启动报错:If you want an embedded database please put a supported one on the classpath
-
If you want an embedded database please put a supported one on the classpath
-
If you want an embedded database please put a supported one on the classpath
-
spring boot 启动报If you want an embedded database please put a supported one on the classpath
-
配置SpringCloud时错误:If you want an embedded database please put a supported one on the classpath
-
启动服务报错:If you want an embedded database please put a supported one on the classpath. If you have dat
-
springboot If you want an embedded database please put a supported one on the classpath