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

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

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

 

 
posted @ 2021-04-11 00:29  过期可乐  阅读(389)  评论(0编辑  收藏  举报