Failed to configure a DataSource:'url' attribute is not specified and no embeddeddatasource
无法配置DataSource:未指定’url’属性,也无法配置嵌入数据源

 

可能是.properties文件中datasource的配置出现错误,例如:地址值,数据库驱动,用户名,密码。

后面发现不是这个这个原因。

经过再三检查,发现是打包误写成了pom.

 

Failed to configure a DataSource: url attribute is not specified and no embedd

在springcloud项目这个打包方式是默认jar或者war包的。

误写成pom,将导致编译后,target文件下只有classes,而导致读取不了,以至于编译后没有其他目标文件夹。

因此把这个打包方式删掉或者改成jar包方式即可。

相关文章:

  • 2021-10-03
  • 2021-07-24
猜你喜欢
  • 2021-04-07
  • 2021-09-24
  • 2021-10-04
  • 2022-12-23
  • 2021-08-03
  • 2021-10-19
相关资源
相似解决方案