解决方案:

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)

作用://取消数据库配置

但是

在用到数据库的时候记得将他改为 @SpringBootApplication , 否则会报错:如下
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxController': Unsatisfied dependency expressed through field 'xxMapper';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxMapper' defined in file [D:\workspacesidea\pear\target\classes\com\wqq\mapper\xxMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

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的更多相关文章

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

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

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

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

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

  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. 5. Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

    解决方案,见  https://www.jianshu.com/p/836d455663da

随机推荐

  1. 1-1 课程简介 & 2-1 IDEA与Eclipse的不同 & 2-3 Intellij IDEA安装

    ---恢复内容开始--- F:\教程\java-慕课\从网页搭建入门Java Web\Java web\步骤四:常用功能\1.IntelliJ IDEA开发工具入门 1-1 课程简介 2-1 IDEA ...

  2. CCF 201604-2 俄罗斯方块 (模拟)

    问题描述 俄罗斯方块是俄罗斯人阿列克谢·帕基特诺夫发明的一款休闲游戏. 游戏在一个15行10列的方格图上进行,方格图上的每一个格子可能已经放置了方块,或者没有放置方块.每一轮,都会有一个新的由4个小方 ...

  3. ASP.NET中在后台用C#,往前台插入HTML代码

    //你的div加ID号,然后写上runat="server",变成服务器端控件,然后后台可以直接用ID号.innerhtml="html内容",这样就可以了 & ...

  4. ASP.NET Response.Cookies

    //设置cookie Response.Cookies["loginPage"].Value = "login.aspx"; //命名并给值 Response. ...

  5. Dapper的正确使用姿势

    本文demo适用于MySQL Dapper优势和缺点 优点 高性能.易排查.易运维.灵活可控 缺点 和EF相比,手写sql当修改表结构不易发现bug. 习惯了EF后再来使用Dapper,会很难适应那种 ...

  6. [WIP]webpack 概念

    创建: 2019/04/09 概念    入口 指示 webpack 应该使用哪个模块,来作为构建其内部依赖图的开始. 进入入口起点后,webpack 会找出有哪些模块和库是入口起点(直接和间接)依赖 ...

  7. HTML基本标签元素

    HTML:  超文本标记语言(HyperText   Mark-up  Language ) 1.作用:写网页结构  2.HTML不区分大小写,建议小写   3.文件后缀 .html  或者  .ht ...

  8. MFC——ComBox用法大全

    Combo Box (组合框)控件很简单,可以节省空间.从用户角度来看,这个控件是由一个文本输入控件和一个下拉菜单组成的.用户可以从一个预先定义的列表里选择一个选项,同时也可以直接在文本框里面输入文本 ...

  9. [Xcode 实际操作]九、实用进阶-(25)使用Storyboard(故事版)的约束功能,使项目快速适配各种分辨率的设备

    目录:[Swift]Xcode实际操作 本文将演示使用故事版的约束功能,使项目快速适配各种分辨率的设备. 在项目导航区打开并编辑主故事版[Main.storyboard]. 在当前故事版中,已经存在一 ...

  10. E. The Best among Equals

    http://codeforces.com/gym/101149/problem/E 这题的话,关键是注意到一定是要max score 然后就可以选出一个L最大优先,并且R最大的区间, 扫一次就能得到 ...