【异常】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>
相关推荐
2401_871492852 分钟前
C#怎么使用泛型 C#泛型类泛型方法和泛型约束的定义和使用方法【语法】
jvm·数据库·python
战南诚24 分钟前
深分页问题
数据库·mysql
2301_7873124325 分钟前
Vue.js中Patch过程处理Teleport组件挂载位置的特殊逻辑
jvm·数据库·python
dfdfadffa35 分钟前
Golang Gin怎么做JWT登录认证_Golang Gin JWT教程【实用】
jvm·数据库·python
m0_7364393039 分钟前
C#怎么实现MVVM模式 C#如何在WPF中使用MVVM设计模式分离视图和逻辑【架构】
jvm·数据库·python
名字不好奇44 分钟前
RAG进阶:下一代RAG怎么玩?
数据库·人工智能
zhoutongsheng1 小时前
Chromebook适合用什么HTML函数工具_轻量化方案汇总【汇总】
jvm·数据库·python
万事大吉CC1 小时前
【4】深入剖析 Django 之 MTV:ORM 系统核心原理
数据库·python·oracle·django·sqlite
ByteX1 小时前
MySQL 联合索引创建效果评估
数据库·mysql
逸Y 仙X1 小时前
文章二十五:ElasticSearch 分页查询
java·大数据·数据库·elasticsearch·搜索引擎·全文检索