关于springboot报错:新建springboot项目报错: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 embedded datasource could be configured.这个异常

 

 

这个异常的意思是,你添加了数据库的配置文件,启动的时候会扫描这个配置文件,而你没有配置,所以找不到!

 

 

解决方法同样也很简单,在

application.properties或者application.yml文件中添加数据库这个配置就好了!

 

posted @ 2020-06-16 13:31  Devin榜  阅读(347)  评论(0编辑  收藏  举报