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

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

In SpringBootApplication after adding (exclude = DataSourceAutoConfiguration.class), caused by loading a database dependent and does not write configuration file

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

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

}

  

 

  

Guess you like

Origin www.cnblogs.com/frankcui/p/12003782.html