Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
错误原因
在pom中引入了mybatis-spring-boot-starter ,Spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean。因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。
解决错误
在Spring boot的启动引导类上增加属性@SpringBootApplication(exclude = DataSourceAutoConfiguration.class),即可阻止Spring boot自动注入dataSource
————————————————
版权声明:本文为CSDN博主「bug开发师」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lwj1433223/article/details/108000303
Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.的更多相关文章
- 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 ...
- 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.autoc ...
- SPRING IN ACTION 第4版笔记-第十章Hitting the database with spring and jdbc-004-使用NamedParameterJdbcTemplate
为了使查询数据库时,可以使用命名参数,则要用NamedParameterJdbcTemplate 1.Java文件配置 @Bean public NamedParameterJdbcTemplate ...
- SPRING IN ACTION 第4版笔记-第十章Hitting the database with spring and jdbc-003-四种方式获取DataSource
一.概述 1.Spring offers several options for configuring data-source beans in your Spring application, i ...
- SPRING IN ACTION 第4版笔记-第十章Hitting the database with spring and jdbc-002-本章的源代码
0.结构 一.JDBC层 1. package spittr.db; import java.util.List; import spittr.domain.Spitter; /** * Reposi ...
- SPRING IN ACTION 第4版笔记-第十章Hitting the database with spring and jdbc-001-Spring对原始JDBC的封装
1.spring扩展的jdbc异常 2.Template的运行机制 Spring separates the fixed and variable parts of the data-access p ...
- 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 ...
随机推荐
- ubuntu 16.04 Chrome安装
打开终端 输入 命令1:sudo wget http://www.linuxidc.com/files/repo/google-chrome.list -P /etc/apt/sources.list ...
- 7.项目结构的构建和提交到gitee
创建微服务模块 以商城项目的产品模块为例 点击Next,然后倒入依赖的包,Spring Web 然后在选择一个微服务和微服务之间调用需要的包:OpenFeign 导入这两个微服务的组件就行,后面需要用 ...
- ionic 架构
1.路由:rout,页面内容:html,页面css:scss,js脚本内容:ts 2.功能介绍 路由:负责组织每个页面. 页面css:scss,负责定制每个组件的内容,比如组件是iobag,那么在这个 ...
- 基础篇之DOS命令
对于编程的小朋友来说,在DOS中输入一些命令也是常有的事情. 今天就来学习一些常见的命令.[该篇是在B站学习Siki学院的课程时做的笔记] DOS命令目录操作 常用DOS命令(输入命令后按下回车) d ...
- git 产生冲突的处理方式
理解你操作图形化的时候, git 在什么? 了解你在做的文件的git状态? 1. 添加文件 git add . -A git commit -m "your commit here" ...
- Kubernetes--创建Ingress资源
创建Ingress资源 Ingress资源是基于HTTP虚拟主机或URL的转发规则,它在资源配置清单的spec字段中嵌套了rules.backend和tls等字段进行定义.下面的示例中定义了一个Ing ...
- Unity 简易聊天室(基于TCP)(1)
为了准备毕业设计,学习了服务器与客户端之间传输的一些简单的知识,并跟着网络上的教程制作了一个简易的Unity聊天室 服务器:用C# .Net Framework写的 结构分为:main(主函数).Se ...
- Mardown学习
Mardown学习 标题: 一级标题:'#'+'空格'+'标题名字'+'回车' 二级标题:'##'+'空格'+'标题名字'+'回车' 三级标题:'###'+'空格'+'标题名字'+'回车' 四级标题: ...
- 在VUE里实现一个简单的中国地图
如何在vue里面实现一个简单的中国地图,并且实现一些简单的个性化修改. 下面是最终实现的效果图.透明的地图加一个背景图. 1.在你的项目里安装echarts的依赖 npm install echart ...
- 注释中的Unicode编码也会被转义
现象 public class Unicode { public static void main(String[] args) { // \u000d System.out.println(&quo ...