问题:启动Springboot 报错 Failed to configure a DataSource:
'url' attribute is not specified and no embedded datasource could be configured :无法配置DataSource的 url属性。
解决方法:
①第一种方法:在application.properties 配置文件配置也可解决。
②第二种方法:在Springboot的启动类中头部声明即可:
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
③第三种方法: 查看 pom.xml 文件里面 中,有没有打包成pom,如果有删除重启即可。
<packaging>pom</packaging>