idea控制台报错Description: Failed to configure a DataSource: ‘url‘ attribute is not specified 错误解决

  • Post author:
  • Post category:其他


在配置MP+swagger+shiro 时springboot启动类打不开,控制台报错

Description:

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

Action:

Consider the following:If you want an embedded database (H2, HSOL or Derby), please put it on the classpath.If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are curently actiye)

说的是url路径有错,于是检查yml文件

但是url根本没有动过,之前还是可以启动,于是乎检查昨天动过的配置

发现新建了一个maven模块后直接点了删除导致pom.xml里打包方式变成pom,

将 <packaging>pom</packaging>删除或者改成<packaging>jar</packaging>

正常启动,成功解决



版权声明:本文为qq_58912004原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。