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': Unsatisfied dependency expressed through field 'xxMapper';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxMapper' defined in file [D:\workspacesidea\pear\target\classes\com\wqq\mapper\xxMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
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的更多相关文章
- 新建springboot项目启动出错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
错误信息入下: 2018-06-23 01:48:05.275 INFO 7104 --- [ main] o.apache.catalina.core.StandardService : Stopp ...
- 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 em ...
- 记一次Spring boot集成mybatis错误修复过程 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
最近自己写了一份代码签入到github,然后拉下来运行报下面的错误 Error starting ApplicationContext. To display the conditions repor ...
- 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 ************ ...
- Spring Boot错误——SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
背景 使用Spring Cloud搭建微服务,服务的注册与发现(Eureka)项目启动时报错,错误如下 *************************** APPLICATION FAILED T ...
- 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 消费者提示需要配置数据源
使用 由于给前端做分页 在启动消费者的时候遇到了这个问题 Failed to configure a DataSource: 'url' attribute is not specified and ...
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
SpringBoot项目编译成功,启动报错 提示信息很明显,通过查看依赖关系,可以找到原因 导致这个问题的原因是因为,在 pom.xml 配置文件中,配置了数据连接技术 spring-boot-sta ...
- 关于“Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.”
Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the c ...
- 5. Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
解决方案,见 https://www.jianshu.com/p/836d455663da
随机推荐
- yarn 基础
创建: 2019/04/06 安装 mac brew install yarn 升级 brew upgrade yarn 确认是否成功 yarn --version 初始化项目 yarn ini ...
- Java之多线程优先级基础
线程得到cpu的给的时间才能运行 有一个同步方法,里面有一个线程进去了,外面A,B俩线程在排队,A优先级比B优先级高,等到同步方法里面的线程出去了, 一定是A先进去; 但是: 因此,仅将高优先级赋予一 ...
- Validation(1)
站在巨人的肩膀上 Java Bean Validation 最佳实践 参数校验是我们程序开发中必不可少的过程.用户在前端页面上填写表单时,前端js程序会校验参数的合法性,当数据到了后端,为了防止恶意操 ...
- Bootstrap里的文件作用
Bootstrap里的文件分别表示什么?都有什么用? bootstrap.css bootstrap.min.css bootstrap-responsive.css bootstrap-respon ...
- mysql ERROR 2003 (HY000): Can't connect to MySQL server on '' (10060
关闭防火墙即可连接成功: systemctl stop firewalld
- DRF教程5-API接口文档和接口测试
配置 配置好,就可以访问web页面 pip install coreapi #安装依赖 from rest_framework.documentation import include_docs_ur ...
- bzoj 2441 [中山市选2011]小W的问题
bzoj 2441 [中山市选2011]小W的问题 Description 有一天,小W找了一个笛卡尔坐标系,并在上面选取了N个整点.他发现通过这些整点能够画出很多个"W"出来.具 ...
- 洛谷P2599||bzoj1413 [ZJOI2009]取石子游戏
bzoj1413 洛谷P2599 根本不会啊... 看题解吧 #include<cstdio> #include<algorithm> #include<cstring& ...
- springMVC-接收数据-参数绑定
接收数据-参数绑定 #Method Arguments概观 Same in Spring WebFlux The table below shows supported controller meth ...
- keil_rtx特点
Keil RTX是一个专为ARM及Cortex M系列处理器开发的无版税的确定的实时操作系统.它允许工程师建立多任务同步并行的程序软件,同时也能帮助使程序代码更加结构化和便于维护. 产品亮点 所有 ...