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 ...
随机推荐
- R8051_simulation
1 下载 git clone https://github.com/risclite/R8051.git 2 编辑文件 mkdir work && mv sim tb flist .. ...
- 打卡node day02--url qs 内置模块
node 内置模块 url [官网链接:http://nodejs.cn/api/url.html] 1.url.parse() 2.url.format() 内置模块Query String 查询字 ...
- SAP GGB0 校验
需求,针对财务凭证分配号的要求 在满足条件下进行必填校验 在需要的位置 创建确认 创建步骤,一般通过点击就可以形成需要的前提逻辑,也可以通过 设置->专门方式 来进行自定义编写. 如果前提条件是 ...
- (jmeter笔记)模拟用户各种场景压测
插件:standard set 1.jp@gc - Ultimate Thread Group(波浪式压测,最终线程组) Start Threads Count :设置启用并发数 Initial De ...
- ES操作
总结一些ES的操作方式及语法 查看健康状态 curl -XGET http://localhost:9200/_cluster/health?pretty 查看索引 curl -XGET ht ...
- k8s排错(Unhealthy)
1,组件 Unhealthy 通过kubeadm安装好kubernetes v1.18.6 查看集群状态,发现组件controller-manager 和scheduler状态 Unhealthy
- Typora怎么让左边的标题折叠
点击文件选择偏好设置->在选择外观->选中侧边栏的大纲视图允许折叠和展开 效果
- SQL-关联
关联的本质:从一张表依次取一条数据和另一张表每一条数据进行匹配 内关联 inner join (inner可省略) -- 只显示关联的上的数据外关联有三种左外 left join -- 主表数据不丢失 ...
- python基础篇 26-redis操作
redis的基本操作: redis_conf ={ 'host':'192.168.64.128', 'password':'Aa123456', 'db':'0', 'port':6379, 'de ...
- Unity中常用的几种读取本地文件方式
使用的命名空间如下 using LitJson;using System.Collections.Generic;using System.IO;using System.Text;using Uni ...