SpringBoot启动错误:Error starting ApplicationContext.
【摘要】
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 --- [ ...
-
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);
-
}
-
}
加上如上配置即可。
文章来源: blog.csdn.net,作者:小小谢先生,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/xiewenrui1996/article/details/116398452
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)