springboot初始化运行时dataSource报错

Failed to configure a DataSource: 'url' attribute is not specified and no embedd:

在本项目中完全没有涉及到任何有关数据库的内容,报错原因是为can not find suitable driver:

后在@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)添加括号内内容即可

posted on 2020-03-21 23:26  kongieg  阅读(760)  评论(0编辑  收藏  举报