【异常】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>
相关推荐
墨神谕14 分钟前
认识一下Unicode(统一码)
android·java·数据库
xywww16832 分钟前
Claude Opus 5 API 接入实战:国内项目上线前的网络、Key、限流和排错清单
大数据·linux·网络·数据库·云计算·aws
yuezhilangniao41 分钟前
某专科医院老数据库迁移实战记录-Oracle10g sqlserver2008等
数据库
白猫不黑44 分钟前
SQL注入实战:手工注入全流程详解
网络·数据库·sql·web安全·网络安全·信息安全
kirs_ur10 小时前
ECC & LDPC — SSD 的数据卫士
服务器·数据库·性能优化
是三一seven11 小时前
Sql注入基础
数据库·安全·网络安全
Sirens.11 小时前
MySQL表设计进阶-约束范式连接索引与事务
android·数据库·mysql
字节跳动开源13 小时前
火山引擎开源 Agent 驱动的搜索自迭代技术
数据库·开源·agent
Oo大司命oO15 小时前
藏在正则表达式里的陷阱
数据库·mysql·正则表达式
_oP_i16 小时前
mysql统计数据库使用存储大小
数据库