问题描述

写了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.报错的解决的更多相关文章

  1. 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 ...

  2. 新建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 ...

  3. 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 ************ ...

  4. 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 ...

  5. 记一次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 ...

  6. 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 ...

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

    SpringBoot项目编译成功,启动报错 提示信息很明显,通过查看依赖关系,可以找到原因 导致这个问题的原因是因为,在 pom.xml 配置文件中,配置了数据连接技术 spring-boot-sta ...

  8. 关于“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 ...

  9. 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) 作用://取消数据库配置 但是 在用到数据库的时候记 ...

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

    启动springboot的时候莫名其妙出现这个错误,我properties里面也没配置数据源啥的,但就是出现这个错误 解决方法: 在启动类上加@SpringBootApplication(exclud ...

随机推荐

  1. Software--Programming--Java__Maven

    Maven 是一个构建工具,可用于编译.测试和部署 Java 项目 采用了 管理优先配置原则. Maven 构建的项目的默认目录结构       1 <?xml version="1. ...

  2. 动画图解 Git 的 10 大命令

    原文地址:https://dev.to/lydiahallie/cs-visualized-useful-git-commands-37p1 原文作者:Lydia Hallie 前言 尽管 Git 是 ...

  3. 上传镜像到harbor

    https://blog.csdn.net/weixin_45335305/article/details/123817541

  4. Little Tiger vs. Deep Monkey(hdu4815)01背包

    题:http://acm.hdu.edu.cn/showproblem.php?pid=4815 题意:已知n个题以及每个题答对的得分,给出p概率 小老虎vs小猴子答题:已知小猴子随机答题,请问老虎至 ...

  5. python+pytesseract识别图片文字

    此文只介绍一下python+pytesseract识别一些简单图片的数字,字母和汉字.如图1 import pytesseract from PIL import Image,ImageEnhance ...

  6. 【JavaScript】JS写法随笔(三) JS联动设置元素默认值

    问题: 使用DOM获取元素后setAttribute("value", "1")在页面有修改此标签value的情况下,再次触发function发生不生效.无法修 ...

  7. #Python #字符画 #灰度图 使用Python绘制字符画及其原理

    由于最近身体状况不太好所以更新会有点慢,请大家多多包涵.同时也提醒大家注意保重身体! 前提:默认大家已经正确安装了 Python,且正确将Python配置到了系统Path . 目录 1.字符画的概况 ...

  8. Jndi结合DynamicDataSource实现多数据源配置

    首先注意本框架是SSM,配置主要在两个地方.第一个是applicationContext.xml,第二个文件是Tomcat下面的context.xml里面 1.context.xml文件配置的代码如下 ...

  9. 如何运用Vue自定义组件以及组件的传值

    Vue自定义组件 引入组件 首先在项目内的components新建.vue文件. 创建完成之后搭建完整的框架.其实就是新建组件,在此之前,需要在VScode中引入一个插件(vue 2 snippets ...

  10. MySQL查询和事务

    数据库关联查询 内连接查询(inner join) SELECT * FROM tb1 INNER JOIN tb2 ON 条件 左表查询(左关联查询)(left join) 查询两个表共有的数据,和 ...