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 ...
随机推荐
- Android 将函数放到主线程运行
有时候,app会检测加密函数是否在主线程运行,为了逃避这种检测,要将函数放到主线程运行 Class<?> aClass = RposedHelpers.findClass("co ...
- centos删除安装vsftpd
准备工作 1.centos 卸载vsftpd 删除原有的vsftpd(卸载前先关闭 vsftpd: systemctl stop vsftpd)[root@localhost ~]# rpm -aq ...
- springboot java redis 监听超时事件
package ideal4j.pfa.config.redis; import cn.hutool.core.date.DateTime; import com.alibaba.fastjson.J ...
- ssr next 学习记录
预加载页面 只有生产环境才有 当页面初始化加载时,getInitialProps只会加载在服务端.只有当路由跳转(Link组件跳转或 API 方法跳转)时,客户端才会执行getInitialPro ...
- JavaScript 字符串的操作
1. 在指定位置,插入字符串(此需求来源于,img中src没值的字符串标签中,插入图片http地址) // 使用slice写出的 自定义方法,绑定在String的原型链上 String.prototy ...
- noi 1.1 2 输出第二个整数
描述 输入三个整数,把第二个输入的整数输出. 输入 只有一行,共三个整数,整数之间由一个空格分隔.整数是32位有符号整数. 输出 只有一行,一个整数,即输入的第二个整数. 样例输入 123 456 7 ...
- 简单的IP网络
企业网络架构:小型.扁平化设计,特点:设备少,网络复杂度低,用路由器加交换或路由器就可以实现. 大中型,分层设计,接入层汇聚层核心层,特点:设备众多,网络组建复杂度高.终端设备较多,偏平化设计不适合. ...
- vi/vim 命令
vim 文件路径 编辑一个文件,英文模式, 按i:输入模式 按Esc:命令模式 输入模式 dd 删除一行 gg 跳到开头 shift+g 跳到结尾 U 撤销 shift+U 恢复撤销 命令模式 :wq ...
- plsql链接oracle
安装两个oracle文件夹在一个database中,安装plsql 要先配置两个都要修改,不然会找不到服务器 管理员运行 监听服务/监听位置和数据库服务都要修改 ass文件---监听程序配置 和本场 ...
- maven资源导出问题
<!--在build中配置resources,来防止我们资源导出失败的问题--> <build> <resources> <resource> < ...