【异常】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>
相关推荐
HelloWorld__K4 小时前
整合阿里云短信服务
数据库·阿里云·云计算
lytao1234 小时前
离线安装MongoDB集群
数据库·mongodb
Ralph_Y4 小时前
C++数据库操作
开发语言·数据库·c++
Access开发易登软件4 小时前
Access 数据可视化:如何制作箱形图
前端·数据库·vba·access·access开发
醉风塘4 小时前
MongoDB内嵌文档深度解析:使用MongoTemplate进行高效操作
数据库·mongodb
电商API_180079052474 小时前
淘宝商品数据爬虫技术实践指南
大数据·数据库·人工智能·爬虫
酸菜牛肉汤面4 小时前
17、什么是脏读?幻读?不可重复读?
java·数据库·mysql
ClouGence4 小时前
数据实时迁移同步工具 CloudCanal-v5.3.1.0 发布,支持金仓数据库
大数据·数据库·mysql·数据分析·dba
怪我冷i4 小时前
GORM 的 Migration API
数据库·postgresql·golang·ai编程·ai写作
Miss_Chenzr4 小时前
Springboot快递信息管理52c05本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
java·数据库·spring boot