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.
问题解决
在@SpringBootApplication注解后面加上这样一句代码:(exclude= {DataSourceAutoConfiguration.class})

就可以完美解决这一问题啦!
我后续又出现了8080端口被占用的情况,简单,直接在.yml文件里面换一个端口运行就能够解决啦!
问题解决之后:

成功输出想要的结果!!!
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.
新建了一个springboot项目报一下错误: Failed to configure a DataSource: 'url' attribute is not specified and no em ...
- 新建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使用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 ...
- 记一次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 ...
- 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 ...
- 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) 作用://取消数据库配置 但是 在用到数据库的时候记 ...
- 奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
启动springboot的时候莫名其妙出现这个错误,我properties里面也没配置数据源啥的,但就是出现这个错误 解决方法: 在启动类上加@SpringBootApplication(exclud ...
随机推荐
- vue 在 v-for 时给每项元素绑定事件需要用事件代理吗?为什么?
vue本身不做事件代理(react将所有事件都委托到document上,然后进行派发) 普通html元素和在组件上挂了.native修饰符的事件.最终EventTarget.addEventListe ...
- 查询某数据库的某字段存在于哪些表 mysql
select column_name,column_comment,data_type ,table_name from information_schema.columns where table ...
- stopping hbasecat:/tmp/hbase-root-master.pid:No such file or directory
今天在新电脑上安装虚拟机的时候,尝试打开hadoop和hbase,hadoop打开没有问题,就是hbase关闭的时候报了stopping hbasecat:/tmp/hbase-root-master ...
- 前端-对js原型继承的简单举例
function A(name,color){ this.name=name; this.color=color; } A.prototype.getColor=function(){ retur ...
- 第二章:用Python对不同的商品销售数据进行预测分析
文章目录 项目背景 获取数据 线性数据预测 非线性数据预测 源码地址 本文分享知识: os 模块获取上一级目录的绝对地址 pands 读取 sqlite3 数据库中的数据 用sklearn中的线性回归 ...
- ELK收集njinx
前提:安装elk 1.yum安装nginx 2.修改配置文件 vim /etc/nginx/nginx.conf.d 3.重新启动 nginx -s reload 4.安装压测命令 压测文件 5.写完 ...
- python修改图片名
1 import glob 2 import os 3 4 inputPath = r'E:/data/pic/cat' 5 fileList = glob.glob(inputPath + '/*' ...
- UGUI让自动布局下的子物体不接受布局(LayoutGroup)影响
在子物体上添加Layout Element组件 看到这个组件上有个Ignore Layout,这个就是忽视布局,把它勾上就可以忽视父级对它的布局了. 转自:https://zhuanlan.zhihu ...
- applicationContext.xml及springMVC.xml详解
在前面的web.xml详解里,我们引入applicationContext.xml和springMVC.xml两个配置文件, 前者是spring 全局配置文件,用来控制spring 特性的, 后者则是 ...
- 在Jupyter Notebook 中输出 HTML
在刚开始使用 Jupyter Notebook 时,我总想使输出结果更使人满意,而不是只把结果打印出来.在我知道可以用 HTML 输出之前,我是这样输出一个表格的(数据来源:软科中国大学排名). 中国 ...