问题描述

写了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. 什么是Entity Framework(ORM)

    高手掠过,仅仅是查漏补缺 Entity Framework是什么: 1,ADO.NET  Entity Framework 是微软以 ADO.NET 为基础所发展出来的对象关系对应 (O/R Mapp ...

  2. 关于html中元素和布局的笔记

    一.元素类型 css标准文档流:默认的网页从左到右,从上到下的排列方式显示出网页效果 类型: 1.块级元素:(div,p,table--) a.独占一行 b.可以设置宽度和高度 c.可以设置左右居中( ...

  3. python脚本通过adb命令安装包

    import os os.system("adb install E:\\huaxin.apk") os.system("adb install E:\\hx_recor ...

  4. 项目自动备份,oracle 自动备份

    1 项目备份      变量的形式 定时任务不执行就都写成了绝对路径 #!/bin/bash # # 项目路径 /usr/local/tomcat-bjkjdx 备份文件路径/usr/local/ba ...

  5. pads:数据格式不正确,网络必须包含一个以上管脚

    1,如果已经有pcb封装,则在pads logic软件里面-元件编辑器-重新做封装,在--编辑电参数--里面匹配对应pcb封装, 2,点击-工具--,--从库中更新--,更新一下,之后导入pcb la ...

  6. redies概述

    1.redis下载路径 Windows:https://github.com/tporadowski/redis/releases Linux:http://redis.io/download 2.安 ...

  7. Markdown基础学习

    Markdown学习 一级标题 #加空格 标题二 二级标题 ##加空格 如此类推 标题三 或者Ctrl+123456 字体 加粗 两个** hello world 倾斜一个* hello world ...

  8. DTO的理解

    首要的作用,我认为就是减少原生对象的多余参数.包括为了安全,有时候也为了节约流量.例如:密码,你就不能返回到前端.因为不安全. 其次假如说:获取博客列表的时候,也不能返回博客全文吧.顶多就返回标题,i ...

  9. 字节过滤流 缓冲流-->BufferedInputStream用法

    1创建字节输入节点流FileInputStream fis = new FileInputStream("文件读取的路径");2创建字节输入过滤流,包装一个字节输入节点流Buffe ...

  10. linux 学习之awk

    awk 笔记 awk可以截取列 如 ll | awk '{print $3}' 获取第三列内容 参数 -F 指定分隔符 如 ls | wak -F "." '{print $1}' ...