使用spring boot启动时报错:
Spring boot 启动报错 Failed to auto-configure a DataSource
是由于引入了某些依赖需要添加数据库配置文件,但是项目里面没有配置
解决方案:
1.取消没必要的数据库相关依赖,或把数据库相关配置信息配置上去
2.在启动类SpringBootApplication.Java 里面添加exclude = {DataSourceAutoConfiguration.class},排除自动注入数据源的配置(取消数据库配置),一般使用在客户端(消费者)服务中
Spring boot 启动报错 Failed to auto-configure a DataSource

相关文章:

  • 2021-07-09
  • 2021-07-24
  • 2022-02-16
  • 2021-07-23
  • 2021-11-27
  • 2022-01-14
  • 2021-04-07
  • 2021-10-11
猜你喜欢
  • 2021-07-28
  • 2021-06-11
  • 2021-12-10
  • 2022-01-04
  • 2022-01-05
  • 2021-04-23
  • 2021-08-08
相关资源
相似解决方案