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 ...
随机推荐
- element ui 分页
修改选中页码的样式: .el-pager .active{ color:red !important;//选中 } .el-pager .number:hover{ color:red !import ...
- JS篇(008)-require 与 import 的区别
答案:两者的加载方式不同.规范不同 第一.两者的加载方式不同,require 是在运行时加载,而 import 是在编译时加载 require('./a')(); // a 模块是一个函数,立即执行 ...
- create-react-app卸载与升级
用create-react-app 创建项目发现报错 You are running `create-react-app` 4.0.3, which is behind the latest rele ...
- Docker学习——Docker 三剑客(七)
Docker Compose 简介 Docker Compose 是 Docker 官方编排(Orchestration)项目之一,负责arg>...] [options] [COMMAND] ...
- *args、**kwargs参数组
'''def test(*args): # *agrs接收的是N个位置参数,不能接受关键字参数,转化成元祖 print(args)test(1,2,3,4,5,6)test(*[1,2,4,5,5]) ...
- 2020-2021第一学期2024"DCDD"小组第十一周讨论
2020-2021第一学期"DCDD"第十一周讨论 小组名称:DCDD 小组成员:20202403孟凡斌.20202411陈书桓.20202416刘铭睿.20202420黄椿淇 照 ...
- 24 Django模块的导入--常用总结
常用模块导入 1 forms # forms组件的使用 from django import forms 2 ValidationError # modelform报错时使用 from django. ...
- 会话保持 Session和cookie
Session是什么? Session在网络中称为会话控制,是服务器为了保护用户状态而创建的一个特殊的对象,简而言之,session就是一个对象,用于存储信息. Session有什么用? sessio ...
- Liunx安装eclipse-mosquitto之docker容器
1.docker拉取 docker pull eclipse-mosquitto 2.查看镜像 docker images 3.建立配置目录 mkdir -p /mnt/mosquitto/confi ...
- expected expression before')'token
如上图所示,今天遇到的一个编译问题,明明用法跟其他地方的一摸一样,在主程序里编译就没问题,动态库里死活都编译不过去,可把我折磨死了,最后没办法,只能请教大佬,大佬过来几分钟就找到了问题,真正出错的地方 ...