【异常】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>
相关推荐
·云扬·21 小时前
MySQL 主从复制实战:Xtrabackup 高效部署方案
数据库·mysql
Ama_tor1 天前
从零开始MySQL|F盘安装,配置,简单应用以及基础语句
数据库·mysql
亓才孓1 天前
【MyBatis Exception】Public Key Retrieval is not allowed
java·数据库·spring boot·mybatis
_千思_1 天前
【小白说】数据库系统概念 6
数据库
野犬寒鸦1 天前
深入解析HashMap核心机制(底层数据结构及扩容机制详解剖析)
java·服务器·开发语言·数据库·后端·面试
ruxshui1 天前
元数据及元数据备份、迁移详解
数据库
禅与计算机程序设计艺术1 天前
了解NoSQL的数据仓库和ETL
数据库·数据仓库·nosql·etl
专注前端30年1 天前
负载均衡实战项目搭建指南:从基础到高可用全流程
运维·数据库·负载均衡
山岚的运维笔记1 天前
SQL Server笔记 -- 第68章:内存中 OLTP(Hekaton)
数据库·笔记·sql·microsoft·sqlserver