- 如果我们的文件中已经配置了数据库相关信息,但是打包以后启动还是报错如下,查看是否是同时使用application.properties和application.yml文件,如果两个文件同时存在,将所有配置移动到application.yml后删除application.properties
如果删除application.properties以后仍然不能解决这个问题,尝试clean一下
*************************** APPLICATION FAILED TO START *************************** 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). |