【异常】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>
相关推荐
FL4m3Y4n17 分钟前
MySQL缓存策略
数据库·mysql·缓存
wsx_iot19 分钟前
TDengine学习
数据库·学习·tdengine
不吃香菜的小趴菜38 分钟前
mysql数据库打包与导入
数据库·mysql
野犬寒鸦41 分钟前
Redis复习记录day1
服务器·开发语言·数据库·redis·缓存
njidf41 分钟前
实战:用Python开发一个简单的区块链
jvm·数据库·python
Rick19931 小时前
慢SQL优化
数据库·python·sql
IvorySQL1 小时前
速抢!HOW 2026 早鸟票最后 1 天,解锁开源数据库盛会全亮点
数据库·postgresql·开源
IvorySQL1 小时前
PostgreSQL 技术日报 (3月30日)|内核补丁密集更新,REPACK 并发与索引预读取进展
数据库·postgresql·开源
NineData1 小时前
从业务库到实时分析库,NineData构建MySQL到SelectDB同步链路
数据库·mysql·程序员
IvorySQL1 小时前
PostgreSQL 技术日报 (3月29日)|内核工具增强 + 安全能力升级
数据库·postgresql·开源