Error starting ApplicationContext. To display the conditions report re-run your application with

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

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

 

Error starting ApplicationContext. To display the conditions report re-run your application with

原因:新创建的项目没有配置数据源  所以在项目启动的时候回去查找项目的数据源,但是发现找不到所以报错。

           如果配置了数据源之后  就算是没有排除自动配置数据源。

 

解决办法:

Error starting ApplicationContext. To display the conditions report re-run your application with

 

 

 

在启动类注解上

  @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)

然后启动成功!
 

 

上一篇:关于spring boot中 EmbeddedServletContainerCustomizer


下一篇:Python数据的相关性和标准化