【异常】SpringBoot3.2.0 Description: Failed to configure a DataSource: ‘url‘ att

mybatisPlus 多数据源导致

异常

复制代码
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 (the profiles dev are currently active).

解决

spring-boot 1.5.x 2.x.x

复制代码
<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
  <version>${version}</version>
</dependency>

spring-boot3 使用以下依赖

复制代码
<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
  <version>${version}</version>
</dependency>
相关推荐
LSL666_14 分钟前
MybatisPlus条件构造器(上)
java·数据库·mysql·mybatisplus
U-52184F6929 分钟前
深入理解“隐式共享”与“写时复制”:从性能魔法到内存深坑
java·数据库·算法
程序猿ZhangSir1 小时前
详解了解 Redis IO多路复用底层原理,Select,poll,epoll三者的区别?
数据库·redis·缓存
U-52184F691 小时前
深度解析:从 Qt 的 Q_D 宏说起,C++ 工业级 SDK 是如何保证 ABI 稳定性的
数据库·c++·qt
Gauss松鼠会1 小时前
【GaussDB】LLVM技术在GaussDB等数据库中的应用
大数据·数据库·架构·数据库开发·gaussdb·llvm
IMPYLH1 小时前
Linux 的 dir 命令
linux·运维·服务器·数据库
wfsm1 小时前
mysql事务
数据库·mysql
SadSunset2 小时前
第一章:Redis 入门介绍
数据库·redis·缓存
weixin_464307632 小时前
QT智能指针
java·数据库·qt
王仲肖2 小时前
PostgreSQL VACUUM 与 AUTOVACUUM 深度解析
数据库·postgresql