Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-11-15 20:51:35.036 ERROR [bootstrap,,,] 23804 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "localResource,healthCheck" are currently active).
其实这时有两个思路,直接google搜索Cannot determine embedded database driver class for database type NONE,就可以找到解决办法。
第二种方式,仔细查看日志内容,可以发现有To display the auto-configuration report re-run your application with ‘debug’ enabled.。
搜索下这个,就可以在spring的官方网站上找到相关的信息:https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-auto-configuration.html
就是用户只要配置了debug这个开关,就会把auto-configuration 相关的信息打印出来。
熟悉spring的环境变量注入的话,就可以知道有几种打开这个的方式:
在args里增加–debug 在application.properties里增加debug=true 通过-Ddebug=true 增加debug开关之后的信息 增加debug开关之后,可以看到打印出了错误堆栈: