【异常】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>
相关推荐
Mr_Xuhhh3 分钟前
MySQL数据表操作全解析:从创建到管理
数据库·sql·oracle
大模型玩家七七4 分钟前
向量数据库实战:从“看起来能用”到“真的能用”,中间隔着一堆坑
数据库·人工智能·python·深度学习·ai·oracle
OceanBase数据库官方博客6 分钟前
基于分层协作多智能体的数据库参数调优——OceanBase 校企研究
数据库·oceanbase·分布式数据库
2301_763472469 分钟前
使用PyQt5创建现代化的桌面应用程序
jvm·数据库·python
爱学习的阿磊10 分钟前
Web开发与API
jvm·数据库·python
阳光九叶草LXGZXJ13 分钟前
达梦数据库-学习-50-分区表指定分区清理空洞率(交换分区方式)
linux·运维·数据库·sql·学习
Data_Journal14 分钟前
【无标题】
大数据·服务器·前端·数据库·人工智能
qq_1927798714 分钟前
Python多线程与多进程:如何选择?(GIL全局解释器锁详解)
jvm·数据库·python
亚控科技16 分钟前
超大型数据中心冷源群控升级:自主可控与智能调控的实践
数据库·智慧楼宇·kingscada·亚控科技·信创scada·大型数据中心
naruto_lnq17 分钟前
NumPy入门:高性能科学计算的基础
jvm·数据库·python