【异常】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>
相关推荐
DataGear24 分钟前
如何在DataGear 5.4.1 中快速制作SQL服务端分页的数据表格看板
javascript·数据库·sql·信息可视化·数据分析·echarts·数据可视化
码不停蹄的玄黓38 分钟前
MySQL Undo Log 深度解析:事务回滚与MVCC的核心功臣
数据库·mysql·undo log·回滚日志
Qdgr_1 小时前
价值实证:数字化转型标杆案例深度解析
大数据·数据库·人工智能
数据狐(DataFox)1 小时前
SQL参数化查询:防注入与计划缓存的双重优势
数据库·sql·缓存
Arthurmoo1 小时前
Linux系统之MySQL数据库基础
linux·数据库·mysql
博观而约取1 小时前
Django ORM 1. 创建模型(Model)
数据库·python·django
找不到、了2 小时前
MySQL的窗口函数介绍
数据库·mysql
执笔诉情殇〆3 小时前
springboot集成达梦数据库,取消MySQL数据库,解决问题和冲突
数据库·spring boot·mysql·达梦
软件技术NINI3 小时前
springMvc的简单使用:要求在浏览器发起请求,由springMVC接受请求并响应,将个人简历信息展示到浏览器
数据库·mysql
SailingCoder5 小时前
MongoDB Memory Server与完整的MongoDB的主要区别
数据库·mongodb