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

错误解决——Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured。Reason: Failed to determine a suitable driver class

一、错误描述

启动springboot项目时报错如图所示:
在这里插入图片描述
检查application.properties配置发现部分配置信息灰掉了,即未被使用
在这里插入图片描述

二、问题原因

在项目中remove掉项目之后再重新引入,resources包可能变成普通包,需要重新mark Dictionary为Resources root类型
在这里插入图片描述

三、解决方案

将resources包重新mark Dictionary为Resources root类型
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_56039103/article/details/125816659