springboot2 在已经配置了数据源的url情况下仍报url未配置问题
Posted wlphyl
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springboot2 在已经配置了数据源的url情况下仍报url未配置问题相关的知识,希望对你有一定的参考价值。
项目在application.yml 或 application.properties文件已经配置了spring.datasource.url数据库信息情况下,
启动仍报:
Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified and no embedded datasource could be auto-configured.
Reason: Failed to determine suitable jdbc url
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a partic
检查pom文件里面 有没有打包成pom
<packaging>pom</packaging>
有的话去掉
以上是关于springboot2 在已经配置了数据源的url情况下仍报url未配置问题的主要内容,如果未能解决你的问题,请参考以下文章