***************************
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
如图,springBoot 启动报错,这个报错的原因有几个,已知比如没有配置数据库连接等。
以下是我遇到的一个问题。
在主项目里建一个子项目 module,此时会在主项目的pom.xml文件中生成
<packaging>pom</packaging>
<modules>
<module>s-01</module>
</modules>
把这几行删了就可以运行主项目了。
比较合理的解释是:当有子项目了,其实主项目里面src这一整块就可以直接删除了。因为不允许运行主项目的同时 也允许子项目。