今天早上在启动人人开源的代码生成器时报错,而昨天晚上还在正常使用。
报错详细信息:
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).
解决办法:
1):@SpringBootApplication中添加exclude = {DataSourceAutoConfiguration.class},排除此类的autoconfig。并没有解决问题
2):POM.xml文件中删除掉下面一行代码,成功解决问题
<packaging>pom</packaging>
原因不详~