首页 > 移动平台 > 详细

Debug - SpringBoot - Error starting ApplicationContext. To display the auto-configuration report re-runyour application

时间:2019-12-08 00:07:41      阅读:128      评论:0      收藏:0      [点我收藏+]

Error log

2019-12-07 22:33:03.959 ERROR 3760 --- [           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

 

Solution

在SpringBootApplication后加(exclude=DataSourceAutoConfiguration.class),原因是加载了数据库依赖而没有写配置文件

/**
 * starter of spring boot
 */
@SpringBootApplication(exclude=DataSourceAutoConfiguration.class)
public class DemoApplication {

	public static void main(String[] args) {
	    SpringApplication.run(DemoApplication.class, args);
	}

}

  

 

  

Debug - SpringBoot - Error starting ApplicationContext. To display the auto-configuration report re-runyour application

原文:https://www.cnblogs.com/frankcui/p/12003782.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!