【异常】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>
相关推荐
jarvisuni15 分钟前
GLM-5V-Turbo多模态测试,克隆Claude官网!
数据库
Full Stack Developme1 小时前
MySQL 触发器 存储过程 介绍
数据库·mysql
杨云龙UP1 小时前
MySQL慢查询日志暴涨导致磁盘告警:slow query log膨胀至397G的生产故障排查:清理、参数优化
linux·运维·服务器·数据库·mysql
Bat U1 小时前
MySQL数据库|视图+索引
数据库·mysql
SQVIoMPLe2 小时前
[拆解LangChain执行引擎]以Actor模型的视角来看Pregel
服务器·数据库·langchain
你都会上树?2 小时前
Ubuntu22 安装PostgreSQL
数据库·postgresql
想唱rap2 小时前
线程之条件变量和生产消费模型
java·服务器·开发语言·数据库·mysql·ubuntu
RInk7oBjo2 小时前
MySQL的编译安装
数据库·mysql·adb
java资料站2 小时前
MySQL 增量同步脚本
android·数据库·mysql
ningmengjing_2 小时前
从零推导出 Redis
数据库·redis