【异常】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>
相关推荐
麦聪聊数据17 小时前
数据服务化时代:企业数据能力输出的核心路径
数据库
shushangyun_17 小时前
2026年快消品B2B系统推荐:支持终端门店订货、促销政策自动化的工具?
java·运维·网络·数据库·人工智能·spring·自动化
DARLING Zero two♡17 小时前
【MySQL数据库】数据类型与表约束
数据库·mysql
曹牧18 小时前
Oracle EXPLAIN PLAN
数据库·oracle
BD_Marathon18 小时前
SQL学习指南——视图
数据库·sql
活宝小娜18 小时前
mysql详细安装教程
数据库·mysql·adb
贤时间18 小时前
codex 助力oracle ebs 开发
数据库·oracle
秉承初心18 小时前
PostgreSQL 数据性能瓶颈突破实战
数据库·postgresql·oracle
Database_Cool_19 小时前
即席查询(Ad-Hoc)数据库选型:AnalyticDB MySQL 秒级 Ad-Hoc 分析方案
数据库·mysql