【异常】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>
相关推荐
betazhou1 小时前
Oracle ADG ,DGBroker管理,异常断电重启主备库的状态
数据库·oracle·goldengate·dgbroker
岁岁岁平安1 小时前
本机 MongoDB 注册系统服务、启用security认证
数据库·python·mongodb
007php0071 小时前
某游戏互联网大厂Java面试深度解析:Java基础与性能优化(一)
java·数据库·面试·职场和发展·性能优化·golang·php
数据库生产实战2 小时前
Oracle RAC灾备环境UNDO表空间管理终极指南:解决备库修改难题与性能优化实战
数据库·oracle·性能优化
姚远Oracle ACE2 小时前
Oracle AWR案例分析:精准定位SQL执行计划切换的时间点
数据库·sql·oracle
凉栀お_2 小时前
MySQL第四次作业(索引、视图)
数据库·mysql
睡前要喝豆奶粉2 小时前
.NET Core Web API中数据库相关配置
数据库·c#·.netcore
大G的笔记本3 小时前
高频 Redis 面试题答案解析
数据库·redis·缓存
万事大吉CC3 小时前
SQL语法基础教程
数据库·oracle
betazhou4 小时前
Oracle dgbroker常规命令管理简介
数据库·oracle·adg·dbbroker