Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may ne
更多精彩关注微信公众号

错误原因
在pom中引入了mybatis-spring-boot-starter ,Spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean。因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。
解决错误
在Spring boot的启动引导类上增加@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}),阻止Spring boot自动注入dataSource

推荐阅读:
IntelliJ IDEA打开Maven项目,Spring boot所有依赖红名,不可用
创建Maven项目,GroupId和Artifact Id该如何填写?
问:hibernate的sessionfactory是干嘛的?session又是干嘛的呢?
Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may ne的更多相关文章
- Spring boot 启动错误处理:Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular...
错误原因 在pom中引入了mybatis-spring-boot-starter ,Spring boot默认会加载org.springframework.boot.autoconfigure.jdb ...
- springboot 的部分细节
Application.properties 中#指定端口号 server.port= #指定访问路径必须以/crud/xxx 开始 server.servlet.context-path=/crud ...
- SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe
问题描述 *************************** APPLICATION FAILED TO START *************************** Description ...
- If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
学习Spring Boot 过程中遇到了下列这个问题 Description: Failed to configure a DataSource: 'url' attribute is not spe ...
- springboot启动报错Failed to configure a DataSource
2018-11-21 19:43:12.076 WARN 5392 --- [ main] ConfigServletWebServerApplicationContext : Exception e ...
- springBoot整合mybatis、jsp 或 HTML
springBoot整合mybatis.jsp Spring Boot的主要优点: 1: 为所有Spring开发者更快的入门: 2: 开箱即用,提供各种默认配置来简化项目配置: 3: 内嵌式容器 ...
- SpringBoot2 启动报错 Failed to auto-configure a DataSource
今天Spring Boot 2.0正式版发布,寻思着搭个小demo尝试一下Spring Boot的新特性,使用idea创建项目.在选择组件时添加了mysql.mybatis 然后在第一次启动的时候启动 ...
- Spring boot&Mybatis 启动报错 Failed to auto-configure a DataSource
*************************** APPLICATION FAILED TO START *************************** Description: Fai ...
- 新建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 ...
随机推荐
- Linux 切换用户提示Permission denied
在使用 su - hdfs 切换到 hdfs 用户时提示 su: Permission denied,但是密码确认是没错的. 找到文件 /etc/pam.d/su,注释掉 auth required ...
- mongodb安装及常见命令操作
Mongodb是一个介于关系数据库和非关系数据库之间的产品(Nosql),是非关系数据库当中功能最丰富,最像关系数据库的,语法有点类似javascript面向对象的查询语言,它是一个面向集合的,模式自 ...
- ASP.NET Core分布式日志系统ELK实战演练
一.ELK简介 ELK是Elasticsearch.Logstash和Kibana首字母的缩写.这三者均是开源软件,这三套开源工具组合起来形成了一套强大的集中式日志管理平台. • Elastics ...
- mysql数据库忘记密码时如何修改密码
方法/步骤 1.进入 mysql 的 bin 目录下,打开 cmd ,在此之前关闭mysql服务,并且结束mysqld.exe进程 ...
- Shell中的(),{}几种语法用法-单独总结
shell中的(),{}几种语法用法 查看脚本语法是否有错误: bash -n modify_suffix.sh 跟踪执行 sh -x modify_suffix.sh aaa 1. ${var} 2 ...
- flexbox(弹性盒布局模型),以及适用场景
一.是什么 Flexible Box 简称 flex,意为"弹性布局",可以简便.完整.响应式地实现各种页面布局 采用Flex布局的元素,称为flex容器container 它的所 ...
- 学习笔记-git 上传
0.git add * (如果你需要修改源码需要在 1 之前使用,然后再回到 1) 1.git commit -m '提交文字描述' 2.git push -u origin master (上传到主 ...
- [Fundamental of Power Electronics]-PART I-1.引言-1.1 功率处理概论
1.1 功率处理概论 电力电子领域关注的是利用电子设备对电力进行处理[1–7].如图1.1所示,其中关键部件就是开关变换器.通常,开关变换器包含电源输入和控制输入端口以及电源输出端口.原始输入功率按控 ...
- 201871030116-李小龙 实验一 软件工程准备——Blog
项目 内容 课程班级博客链接 https://edu.cnblogs.com/campus/xbsf/2018CST 这个作业要求链接 https://www.cnblogs.com/nwnu-dai ...
- OO第三单元小结
目录 JML理论基础 JML工具链 openjml使用 openjml总结 jmlunitng使用 代码分析 第一次作业 第二次作业 第三次作业 测试&bug分析 黑盒测试 白盒测试(Juni ...