启动boot项目报错:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd

这是由于项目中缺少数据源导致的,如果你项目用不到数据源,在启动类注解上添加排除数据源注解即可:@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)如图:
在这里插入图片描述
如果确实需要数据源,则配置好数据源即可:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_42969135/article/details/114292694