首页 > 编程语言 > 详细

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.解决办法(springboot)

时间:2021-04-11 10:54:48      阅读:19      评论:0      收藏:0      [点我收藏+]

因为没有配置数据库的url、username、password、等导致的,但是我现在不需要连接数据库,解决办法如下:

主启动类的 @SpringBootApplication 注解里面多加一个参数 @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

 

 

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.解决办法(springboot)

原文:https://www.cnblogs.com/liweixml/p/14642755.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!