错误日志大体是这样的
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-08-05 10:56:04,870 ERROR [LoggingFailureAnalysisReporter.java:42] :
***************************
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 (no profiles are currently active).
2018-08-05 10:56:04,874 INFO [AbstractConfig.java:450] : [DUBBO] Run shutdown hook now., dubbo version: 2.5.3, current host: 127.0.0.1
解决方式可以参考这个路径:https://blog.csdn.net/weixin_39220472/article/details/81429241
上面主要是使用@SpringBootApplication注解排除。
另外这里补充下其他情况也会出现该问题,可以参考排查:
第一种情况是pom.xml中导入热部署包导致的:
<!--Spring Boot热部署插件--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
可以把该部分注释。
第二种情况是某一个service实现类没有添加@Service注解导致的,需要根据错误提示进行处理