【异常】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>
相关推荐
蓝鸟19741 小时前
Oracle 19c JSON_OBJECT 完全实战指南|嵌套、多行多列数组合并、空值踩坑、医保报文落地
数据库·oracle·json_arrayagg·多行转json数组·sql实战踩坑·数据库json拼装·json_object
晴天161 小时前
Agent 全栈学习笔记 1-Day14
数据库·笔记·学习
瀚高PG实验室1 小时前
几种因网络波动导致应用与数据库操作异常的现象
运维·网络·数据库·postgresql·瀚高数据库
崖边看雾1 小时前
同步上下文管理器规则
开发语言·数据库
.柒宇.1 小时前
运维常见面试题_02_数据库
运维·数据库·sql·面试
名字还没想好☜10 小时前
Python f-string 进阶:数字格式化、对齐填充、调试 = 号与嵌套表达式
开发语言·数据库·python·字符串格式化·f-string
ltl10 小时前
Serverless 数据库弹性理论:Neon 与 Aurora Serverless v2
数据库
marvelyu15 小时前
每天10分钟学会OceanBase系列(Day 20):跨机房容灾实战——构建多数据中心高可用架构
java·大数据·数据库
ZCBUS实时计算15 小时前
金融证券实时数仓建设实践:轻量化实时计算平台落地,实现交易数据端到端秒级处理
大数据·数据库·数据仓库·金融·flink·dba·etl
zd20057215 小时前
海洋微生物数据库
数据库·宏基因组