最近使用idea这个开发工具,启动spring boot 框架搭建的项目,报了以下错误:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-20 21:10:18.275 ERROR 10968 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
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).
Process finished with exit code 1
网上资料很多,发现都不能解决问题,进过请教,终于找到了原因,原来是资源配置文件没有在idea这个工具中加载成功,解决方案如下: