【异常】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>
相关推荐
jiunian_cn7 小时前
【Redis】渐进式遍历
数据库·redis·缓存
橙露7 小时前
Spring Boot 核心原理:自动配置机制与自定义 Starter 开发
java·数据库·spring boot
冰暮流星7 小时前
sql语言之分组语句group by
java·数据库·sql
符哥20087 小时前
Ubuntu 常用指令集大全(附实操实例)
数据库·ubuntu·postgresql
C++ 老炮儿的技术栈7 小时前
Qt 编写 TcpClient 程序 详细步骤
c语言·开发语言·数据库·c++·qt·算法
怣507 小时前
MySQL子查询零基础入门教程:从小白到上手(零基础入门版)
数据库·mysql
码界调试侠7 小时前
MongoDB 常用查询语法
数据库·mongodb
静听山水7 小时前
StarRocks导入数据【Stream Load】
数据库
藦卡机器人7 小时前
国产机械臂做的比较好的品牌有哪些?
大数据·数据库·人工智能
jiunian_cn8 小时前
【Redis】数据库管理操作
数据库·redis·缓存