【异常】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>
相关推荐
Apple_羊先森9 分钟前
ORACLE数据库巡检SQL脚本--22、检查碎片程度最高的业务表
数据库·sql·oracle
OnYoung1 小时前
更优雅的测试:Pytest框架入门
jvm·数据库·python
山岚的运维笔记2 小时前
SQL Server笔记 -- 第85章:查询提示
数据库·笔记·sql·microsoft·sqlserver
chilavert3182 小时前
技术演进中的开发沉思-371:final 关键字(中)
java·前端·数据库
tryCbest2 小时前
SQL Server数据库
数据库·sql server
_codemonster3 小时前
PreparedStatement 和 Statement的区别
数据库·oracle
恒云客3 小时前
python uv debug launch.json
数据库·python·json
愈努力俞幸运4 小时前
第5章数据库,实体关系图,ER图
数据库·oracle