【异常】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>
相关推荐
我爱一条柴ya7 分钟前
【AI大模型】RAG系统组件:向量数据库(ChromaDB)
数据库·人工智能·pytorch·python·ai·ai编程
北北~Simple8 分钟前
第一次搭建数据库
服务器·前端·javascript·数据库
鸢想睡觉8 分钟前
【数据库基础 1】MySQL环境部署及基本操作
数据库·mysql
没有口袋啦9 分钟前
《数据库》MySQL备份回复
数据库
c7_ln13 分钟前
MYSQL C_API使用全解
c语言·数据库·mysql
karry013016 分钟前
高并发导致重复key问题--org.springframework.dao.DuplicateKeyException
java·数据库·ide
经典19922 小时前
mysql 锁介绍
数据库·mysql
不太可爱的大白2 小时前
Mysql分片:一致性哈希算法
数据库·mysql·算法·哈希算法
~ 小团子2 小时前
每日一SQL 【游戏玩法分析 IV】
数据库·sql·游戏
零叹2 小时前
MySQL——常用程序and主从复制
数据库·mysql