【异常】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>
相关推荐
TDengine (老段)15 小时前
TDengine IDMP 重塑智慧水务运营(内附 Step by Step 步骤)
大数据·数据库·物联网·时序数据库·iot·tdengine·涛思数据
LSL666_18 小时前
1 概述及简单登录(不涉及数据库)
数据库·servlet
q***064721 小时前
MySQL的UPDATE(更新数据)详解
数据库·mysql
8***B21 小时前
MySQL性能
数据库·mysql
q***72191 天前
oracle使用PLSQL导出表数据
数据库·oracle
数据库生产实战1 天前
Oracle DG备库日志切换解析,Private strand flush not complete如何理解?(基础知识)
数据库·oracle
百***75741 天前
从 SQL 语句到数据库操作
数据库·sql·oracle
i***39581 天前
SQL 注入详解:原理、危害与防范措施
数据库·sql·oracle
m***56721 天前
Win10下安装 Redis
数据库·redis·缓存
Warren981 天前
Python自动化测试全栈面试
服务器·网络·数据库·mysql·ubuntu·面试·职场和发展