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, 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).
于是乎,我在网上找了很多资料了解原因,才发现我的application.yml文件用了 tab 做缩进,然而application.yml文件不能用 tab 做缩进,所以我将缩进改用 空格 ,重新运行,就出现以下报错信息:
Loading class `com.mysql.jdbc.Driver'.
This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.
The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
它说“com.mysql.jdbc.