【异常】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>
相关推荐
洋不写bug33 分钟前
二叉树(四)经典算法题目解析,公共祖先,二叉树构造,非递归遍历
数据库·算法·二叉树·二叉树构造·公共祖先
凯子坚持 c33 分钟前
如何在教育平台中嵌入在线文档编辑组件:ONLYOFFICE Docs从部署到功能全验证
数据库·onlyoffice
SelectDB37 分钟前
Apache Doris 选型实操:4 个维度 Checklist 与验证要点
大数据·数据库·掘金技术征文
SelectDB41 分钟前
Apache Doris 高并发点查与实时写入笔记:一套引擎统一实时数仓与在线服务
大数据·数据库·数据分析
李白客41 分钟前
时序数据库入门:什么是 TSDB?时序库与关系型数据库对比、主流产品选型指南(2026)
数据库·oracle·时序数据库
SelectDB43 分钟前
Apache Doris 存算分离实操:从对象存储接入到多计算集群配置(附 SQL)
大数据·数据库·数据分析
SelectDB1 小时前
Apache Doris 多表 Join 优化实战:从 CBO 到 Colocate Join 配置(附 SQL)
大数据·数据库·数据分析
tachibana21 小时前
什么是 Function Calling ?
数据库·人工智能·ai·llm·agent
全栈弄潮儿²⁰²⁴1 小时前
AI Agent 开发实战(7):如何接入搜索和数据库工具?
数据库·人工智能·ai·chatgpt·oracle·agent·ai编程
砚底藏山河1 小时前
并发与限频工程:把20只的2秒压到0.5秒不封号(魔码量化实战 #03)
java·开发语言·数据库·python·金融