【异常】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>
相关推荐
CJi0NG26 分钟前
【自用】MySQL - 语法:DDL、DML、DQL、DCL
数据库·mysql
姜鱼问生1 小时前
数据库备份 + 灾难恢复演练:从 dump 恢复全库
运维·数据库
ao-weilai2 小时前
MySQL数据库:表约束
数据库·mysql·adb
ly76892 小时前
Redis 分布式锁的边界条件:Redlock 争议、锁续期与客户端崩溃后的互斥失效
数据库·redis·分布式·分布式锁·watchdog·redlock
kaixin_learn_qt_ing2 小时前
qgeoview-samples-basic
数据库
Omics Pro3 小时前
微软:多模态生物世界模型
数据库·人工智能·算法·microsoft·机器学习·自然语言处理
字节渡客3 小时前
接口明明返回成功,数据库偶尔就是没写入
数据库
Ivanqhz3 小时前
KV Cache
服务器·数据库·人工智能·深度学习·算法
Omics Pro3 小时前
~30,000+引用!理论2005,R包2008,多组学集成AI增强
开发语言·数据库·人工智能·算法·机器学习·自然语言处理·r语言
呆萌很4 小时前
数据库逻辑结构设计
数据库