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 ...
随机推荐
- 2022.11.09 NOIP2022 模拟赛六
科学 Source:CF461C Appleman and a Sheet of Paper,*2200. 注意到对于 \(p\le \lfloor \frac {now}{2}\rfloor\),直 ...
- [ARC140D] One to One
个人思路: 一棵树也只有一个 \(a=-1\) 的点,所以可以把它看做一个点,但是要记录点的大小 \(sz_i\),即为这棵树的大小.如果本来就是一个点,那么大小为 \(1\). 状态:\(dp_{i ...
- Jemter 压测基础(一)
Jemter 压测基础(一) 1.压力测试的基本概念: 1.吞吐率(Requestspersecond) 服务器并发处理能力的量化描述,单位是reqs/s,指的是某个并发用户数下单位时间内处理的请 ...
- vue 页面嵌入pdf文件
1.pdf分页显示 2.没有分页
- js 获取标签属性值
有时候需要获取标签里属性里的值,可以采用以下方法: demo: <a href="/admin/article/${id}" onclick="return del ...
- vue界面显示无效的token
返回登陆界面,重新登陆 登陆成功
- VeeValidate 注册实例
注册 1 安装: npm install vee-validate --save 2.mian.js 填写 import Vue from 'vue' import VeeValidate, {Val ...
- Linux 系统挂载 ntfs 移动硬盘无法写入的问题
linux 下挂载 ntfs 移动硬盘无法写入问题 在机房使用移动硬盘时发现无法写入硬盘,具体是 Ubuntu 21.04 ,移动硬盘是 SSD ,分区类型是 NTFS . 首先百度得知最优办法是安装 ...
- Docker部署网心云-挣点电费
网心云 是CDN业务的一种,容器魔方 是网心云的容器安装产品,其安装也很简单. 1.启动容器--一行命令 docker run -d --name watchtower --restart alway ...
- Linux基础命令、按照软件、数据库基础操作
一.Linux基础命令 1.防火墙 systemctl - 控制 systemd 系统与服务管理器 systemctl 可用于 检查和控制 systemd(1) 系统与服务管理器的 状态 常用的命令: ...