【异常】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>
相关推荐
高梦轩4 分钟前
MySQL高可用
android·运维·数据库
紫金修道3 小时前
【DeepAgent】概述
开发语言·数据库·python
孟章豪3 小时前
《SQL拼接 vs 参数化,为什么公司禁止拼接SQL?(附真实案例)》
服务器·数据库·sql
荒川之神3 小时前
ORACLE LEVEL函数练习
数据库·oracle
·云扬·3 小时前
【MySQL】实战:用pt-table-sync修复主从数据一致性问题
数据库·mysql·ffmpeg
swIn KWAL4 小时前
【MySQL】环境变量配置
数据库·mysql·adb
shark22222224 小时前
【JOIN】关键字在MySql中的详细使用
数据库·mysql
RATi GORI4 小时前
MySQL中的CASE WHEN语句:用法、示例与解析
android·数据库·mysql
坊钰4 小时前
Java 死锁问题及其解决方案
java·开发语言·数据库
onebound_noah5 小时前
【实战教程】如何通过API快速获取淘宝/天猫商品评论数据(含多语言Demo)
大数据·数据库