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 ...
随机推荐
- HOW TO RENDER TO A TEXTURE ARRAY IN UNITY
http://xdpixel.com/how-to-render-to-a-texture-array-in-unity/
- 服务器重启后oracle监听无法打开
我重启服务器后不知道为啥监听启动不了,试过各种办法都不行,然后把监听删了重新配置就可以了
- ubuntu 20.04 基于kubeadm部署kubernetes 1.22.4集群及部署集群管理工具
一.环境准备: 集群版本:kubernetes 1.22.4 服务器系统 节点IP 节点类型 服务器-内存/CUP hostname Ubuntu 20.04 192.168.1.101 主节点 2G ...
- 个人js基础知识及看js高级程序设计查漏 汇总
1.事件循环机制 js单线程操作. 1>主线程读取js代码 ,此时为同步环境,形成相应的堆和执行栈. 2>主线程遇到异步任务,指给对应的异步进程处理. 3>异步进程处理完毕后,将相应 ...
- 1.JavaScript的实现与由来
1.一个JavaScript由不同的部分组成 核心(ECMAScript)以下简称ES 文档对象模型(DOM) 浏览器对象模型(BOM) ES就是JavaScript的语法层面 而DOM则是浏览器解释 ...
- 管理名称空间资源(Kubernetes)
管理名称空间资源 名称空间(Namespace)是Kubernetes集群级别的资源,用于将集群分隔为多个隔离的逻辑分区以配置给不同的用户.租户.环境或项目使用.例如,可以为development.q ...
- MySQL单表存储上限
-------------- mysql的上限不是单纯的根据内容的大小决定的.跟数据的条数也有关系. 可以把mysql理解成一个服务器.处理数据的通道的流量有限.(这段瞎编的) MySQL本身并没有对 ...
- python 安装步骤
1.这个安装方法不需要配置环境变量 2. 3. 4.进入cmd,输入python -v
- appium程序下载安装/appium desktop
官网地址:http://appium.io/ 点击下载按钮 默认跳转到最新版本,点击 Releases 回到版本列表页 该页可以看到对应的版本及更新时间,(最好不要下载最新版本) 如果是 Window ...
- 安卓蓝牙协议栈中的RFCOMM状态机分析
1.1 数据结构 1.1.1 tRFC_MCB tRFC_MCB(type of rfcomm multiplexor control block的简写)代表了一个多路复用器.代表了RFCOMM规范 ...