Description:
Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified and no embedded datasource could be auto-configured.
Reason: Failed to determine a suitable driver class
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 particular profile you may need to activate it (no profiles are currently active).
报错显示的是找不到数据库链接的url,如果确定项目中包含着application.yml或者application.properties文件并且内容格式正确的话,考虑application文件是否没有加载,可进行如下操作,在pom.xml中的buid标签中增加如下。其中路径及文件名可能有所出入,根据实际情况更改。
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>