【异常】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>
相关推荐
Umi·11 分钟前
MySQL之多表关联查询练习
数据库·mysql
实泽有之,无泽虚之23 分钟前
Windows环境bat脚本自动备份MySQL数据库并清理旧备份文件
数据库·mysql
索西引擎1 小时前
MySQL 进阶:锁机制
数据库·mysql
龙腾AI白云2 小时前
具身智能模仿学习与人类示教:从观察中习得动作
数据库·机器学习·知识图谱·pygame
Databend2 小时前
活动邀请函|AI 时代的湖仓实践,从应用场景到 Cloud Agent 上手
大数据·数据库·agent
星恒随风3 小时前
MySQL 从零入门(七):索引原理与 B+ 树详解——从磁盘 I/O 到 InnoDB 聚簇索引
linux·服务器·数据库·笔记·mysql
倔强的石头_3 小时前
数据库性能优化手记:一次从KWR到改代码的完整排查
数据库
城北徐宫21 小时前
MySQL数据类型整理
数据库·mysql
数据库小学妹1 天前
数据库容量规划:四个数与扩容触发线
运维·数据库·后端