SpringBoot启动错误:Error starting ApplicationContext.
程序员文章站
2022-05-25 11:55:41
...
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-11-16 15:32:12.994 ERROR 2668 --- [ 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 (no profiles are currently active).
原因是:springboot启动时会自动注入数据源和配置jpa
解决:在@SpringBootApplication中排除其注入
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
//@SpringBootApplication
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
public class CreditApplication {
public static void main(String[] args) {
SpringApplication.run(CreditApplication.class, args);
}
}
加上如上配置即可。
推荐阅读
-
WAC启动Android模拟器 transfer error: Read-only file system错误解决方法
-
Apache启动错误Permission denied: httpd: could not open error log file解决方法
-
解决启动MongoDB错误:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
-
WAC启动Android模拟器 transfer error: Read-only file system错误解决方法
-
Tomcat7启动报Error starting static Resources错误
-
Springboot 使用Idea启动web项目访问JSP报404错误解决
-
idea:springboot整合jsp出现的错误:There was an unexpected error (type=Not Found, status=404). /WEB-INF/jsp。。
-
Tomcat启动错误【Error listenerStart】
-
Tomcat启动报Error listenerStart错误
-
Error starting ApplicationContext.错误解决