昨天 在 Idea 导入了 Eclipse 的项目,练习一下 Idea 的打包方式,第二天 启动 就出现了如下错误。
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).
解决方法:在 pom.xml 文件里 找到
<packaging>pom</packaging>
把 上面的 pom 改成 war
<packaging>war</packaging>
然后点 项目右键 -> Maven -> Update Project -> OK
在启动即可 成功运行。