【异常】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>
相关推荐
TDengine (老段)2 小时前
开放生态破局工业大数据困局:TDengine 的迭代升级与全链路数据自由流动
大数据·数据库·物联网·时序数据库·tdengine·涛思数据
一位代码2 小时前
一些常用的通用 mysql 命令详解及注意事项
数据库·mysql
曹牧2 小时前
Oracle:五笔码
数据库·oracle
今晚务必早点睡2 小时前
MySQL 新手避坑指南:安装、区分、检查一步到位
数据库·mysql·adb
JIngJaneIL2 小时前
基于java+ vue畅游游戏销售管理系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot·游戏
詹姆斯爱研究Java2 小时前
基于Django的租房网站的设计与实现
数据库·python·django
deng-c-f2 小时前
Linux C/C++ 学习日记(50):连接池
数据库·学习·连接池
运维行者_2 小时前
APM 性能监控是什么?从应用监控与网站监控了解基础概念
网络·数据库·云原生·容器·kubernetes·智能路由器·运维开发
全栈小52 小时前
【数据库】当InfluxDB遇到天花板:金仓数据库如何重构时序性能极限?
数据库·重构
颜颜yan_2 小时前
时序数据库性能较量:金仓数据库如何在高负载场景中领跑InfluxDB
数据库·时序数据库