spring boot启动报错: Failed to configure a DataSource: 'url' attribute is not specified ...
原因是数据库在项目中被引用(例如)mybatis,tkmapper等),但没有配置数据库连接。
最简单的解决方案:
在boot启动类添加注释:
@SpringBootApplication(exclude= DataSourceAutoConfiguration.class)
@SpringBootApplication(exclude= DataSourceAutoConfiguration.class)