码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2019-12-07 22:55:24      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:tab   term   suitable   you   str   ring   attribute   依赖   rmi   

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

标签:tab   term   suitable   you   str   ring   attribute   依赖   rmi   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!