Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 问题原因:¶ springboot去寻找数据库配置,但由于模块不需要数据库操作所以没有配置数据库 解决方案:¶ 1.在application.properties文件中配置数据库信息 2.在springboot的启动类中加个属性,默认不加载数据库,即: @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) Comments