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})

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