springboot 新工程报错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

错误日志

... ...
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug‘ enabled.
2020-04-02 12:52:47.306 ERROR 22036 --- [           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

Action:

Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

进程已结束,退出代码1

解决方案 , 启动类添加或修改注解

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

springboot 新工程报错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

原文地址:https://www.cnblogs.com/hi-gdl/p/12619023.html

时间: 2024-10-11 05:55:55

springboot 新工程报错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.的相关文章

第一个springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

报错内容具体如下 *************************** 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

Spring Boot 2.1.7 启动项目失败,报错: "Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured."

一开始按照网上的很多解决办法是: 启动类头部声明@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class}),但是这样会排除掉我自己的数据库配置, 检查了很多地方都没发现问题在哪里,最后自己猜想不论怎么修改application.yml文件,都不生效,是不是因为这个配置文件就没有被加载到? 带着这个想法我就去网上搜了一下问题,有个问题看到了target目录的作用,就去想了一下是不是application.yml文件没有被

【报错】Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

有的时候,dubbo的消费者不需要配置数据源: 在子项目引入父项目依赖的时候 同时引入了自动配置数据源的依赖,有没有配置数据源的时候,就会报错: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 两种解决方法: 如果不需要配置数据源,又需要使用依赖,可以使用第一种方法 取消数据源的自动配置: @SpringBootAp

SpringBoot使用mybatis,发生:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

最近,配置项目,使用SpringBoot2.2.1,配置mybatis访问db,配好后,使用自定义的数据源.启动发生: 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 configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

springboot报错截图: 报错原因: 使用多数据源,第一次运行前要install 解决方法: 没错,就是这个鬼东西: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured 原文地址:https://www.cnblogs.com/biaogejiushibiao/p/9926214.html

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

解决方案: @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) 作用://取消数据库配置 但是 在用到数据库的时候记得将他改为 @SpringBootApplication , 否则会报错:如下org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxController':

奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

启动springboot的时候莫名其妙出现这个错误,我properties里面也没配置数据源啥的,但就是出现这个错误 解决方法: 在启动类上加@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class}) 即在@SpringBootApplication上加(exclude= {DataSourceAutoConfiguration.class}) 其他因为数据源的问题出现的这个错误网上好多,这里不赘述. 奇葩的Faile

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

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 Description: Failed to configure a DataSource: 'url' attribute is not

springboot项目启动报错 url' attribute is not specified and no embedded datasource could be configured

报错相关信息: 2019-07-22 17:12:48.971 ERROR 8312 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not