记一次Spring boot集成mybatis错误修复过程 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
最近自己写了一份代码签入到github,然后拉下来运行报下面的错误
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-- ::02.246 ERROR --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************
APPLICATION FAILED TO START
*************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class 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 need to activate it (no profiles are currently active). Process finished with exit code
调试了很久发现是配置文件没有生效,找到一篇文章(https://blog.csdn.net/ht_kasi/article/details/82259860)后来才发现根本原因
resouce文件夹失效 ,图标与正常的不一样

解决方法,右键resouces文件夹,设置为resouces root即恢复正常

记一次Spring boot集成mybatis错误修复过程 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.的更多相关文章
- Spring Boot错误——SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
背景 使用Spring Cloud搭建微服务,服务的注册与发现(Eureka)项目启动时报错,错误如下 *************************** APPLICATION FAILED T ...
- SpringBoot使用mybatis,发生:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured
最近,配置项目,使用SpringBoot2.2.1,配置mybatis访问db,配好后,使用自定义的数据源.启动发生: APPLICATION FAILED TO START ************ ...
- Spring Boot 2.1.7 启动项目失败,报错: "Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured."
一开始按照网上的很多解决办法是: 启动类头部声明@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class}),但是这样会排除 ...
- 详解Spring Boot集成MyBatis的开发流程
MyBatis是支持定制化SQL.存储过程以及高级映射的优秀的持久层框架,避免了几乎所有的JDBC代码和手动设置参数以及获取结果集. spring Boot是能支持快速创建Spring应用的Java框 ...
- 【spring boot】14.spring boot集成mybatis,注解方式OR映射文件方式AND pagehelper分页插件【Mybatis】pagehelper分页插件分页查询无效解决方法
spring boot集成mybatis,集成使用mybatis拖沓了好久,今天终于可以补起来了. 本篇源码中,同时使用了Spring data JPA 和 Mybatis两种方式. 在使用的过程中一 ...
- Spring Boot集成MyBatis开发Web项目
1.Maven构建Spring Boot 创建Maven Web工程,引入spring-boot-starter-parent依赖 <project xmlns="http://mav ...
- spring boot集成mybatis(1)
Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...
- spring boot集成mybatis(2) - 使用pagehelper实现分页
Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...
- spring boot集成mybatis(3) - mybatis generator 配置
Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...
随机推荐
- Spring 整合 JPA
spring 整合 jpa 客户的基本CRUD 依赖 <properties> <spring.version>4.2.4.RELEASE</spring.version ...
- 【Linux】Windows终端远程链接Linux服务器
一.Windows cmd ssh链接 1.控制面板->程序->启用Telnet客户端 2.输入命令链接 cmd中输入 ssh 账号名@服务器ip地址:端口号 例如: ssh root@1 ...
- 历届试题 危险系数-(dfs+记录路径)
历届试题 危险系数 问题描述 抗日战争时期,冀中平原的地道战曾发挥重要作用. 地道的多个站点间有通道连接,形成了庞大的网络.但也有隐患,当敌人发现了某个站点后,其它站点间可能因此会失去联系. 我 ...
- .Net Core 获取项目所有程序集,排除Microsoft、Nuget下载的
https://www.cnblogs.com/yanglang/p/6866165.html public static List<Assembly> BaiqianAssemblies ...
- 二分查找java实现
二分查找也称折半查找(Binary Search),它是一种效率较高的查找方法.但是,折半查找要求线性表必须采用顺序存储结构,而且表中元素按关键字有序排列. 二分查找思路非常简单,由粗暴的遍历查找改为 ...
- redis缓存, 缓存击穿,缓存雪崩,缓存穿透
在实际项目中,MySQL数据库服务器有时会位于另外一台主机,需要通过网络来访问数据库:即使应用程序与MySQL数据库在同一个主机中,访问MySQL也涉及到磁盘IO操作(MySQL也有一些数据预读技术, ...
- 洛谷 p2055 假期的宿舍 题解
好长时间没更博客了 因为实在太蒻了 这让本蒟蒻怎么办 今天终于遇到了一道模板题(之前也有,不过太蒻了都不会) 不过...写代码5分钟,调试2小时 分界线:回归正题 这个就是普通的匈牙利算法 差不多 思 ...
- sass-loader使用data引入公用文件或全局变量报错
报错信息: ValidationError: Invalid options object. Sass Loader has been initialised using an options obj ...
- springmvc,controller层在接收浏览器url传来的参数带中文乱码问题。
请求地址:http://localhost:8080/saveFlashSale?fsRemark=哈哈哈哈哈 接收方法:@RequestMapping("/saveFlashSale&qu ...
- Affy包 estrogen包
下载安装 if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocMana ...