Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

启动springboot项目报Failed to configure a DataSource: ‘url’ attribute is not specified and no em……的错误

看看配置文件中的url的格式是否有问题
看看配置文件的图标是不是绿色的spring小叶子,如果不是,再检查resources文件的图标是不是这个样子,如果不是,鼠标右击resources文件夹,将其类型改为resources root

image

 

image

 

posted @ 2025-10-14 17:16  八英里  阅读(8)  评论(0)    收藏  举报