【异常】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>
相关推荐
程序员小白条40 分钟前
0经验如何找实习?
java·开发语言·数据结构·数据库·链表
liulilittle1 小时前
C++ 浮点数封装。
linux·服务器·开发语言·前端·网络·数据库·c++
郭涤生1 小时前
QT 架构笔记
java·数据库·系统架构
韩立学长1 小时前
基于Springboot流浪动物领养网站0kh2iyb4(程序、源码、数据库、调试部署方案及开发环境)系统界面展示及获取方式置于文档末尾,可供参考。
数据库·spring boot·后端
DBA小马哥1 小时前
Oracle迁移到金仓数据库:完整迁移步骤与兼容性优化实战
数据库·oracle·国产化平替
@nengdoudou1 小时前
KStudio 客户端无法访问 KES 数据库服务器的指定 IP / 端口
数据库
宋军涛2 小时前
记一次Sqlserver数据库存储过程调用导致的连接池耗尽事件
数据库
前端小臻2 小时前
MySQL 错误 1005 (errno: 150) 深度解析与解决方案
数据库·mysql
魔镜前的帅比3 小时前
向量数据库原理
数据库·人工智能
Dev7z3 小时前
在MySQL里创建数据库
android·数据库·mysql