baomidou / dynamic-datasource

dynamic datasource for springboot 多数据源 动态数据源 主从分离 读写分离 分布式事务
https://www.kancloud.cn/tracy5546/dynamic-datasource/2264611
Apache License 2.0
4.76k stars 1.2k forks source link

调用DynamicRoutingDataSource 的removeDataSource方法无法关闭数据源(DruidDatasource) #637

Closed shen3 closed 5 months ago

shen3 commented 6 months ago

Enviroment

JDK Version(required): 1.8.0_281

SpringBoot Version(required): 2.7.11

dynamic-datasource-spring-boot-starter Version(required): 4.3.0

druid Version(optional): 1.2.8

Describe what happened

调用DynamicRoutingDataSource 的 removeDataSource()方法—>closeDataSource(),DruidDatasource数据源无法关闭. IMG20240509-142607922

IMG20240509-142252756

huayanYu commented 6 months ago

欢迎PR

shen3 commented 6 months ago

@huayanYu IMG20240509-165353318

如果是其他的Datasource ,直接赋值给realDatasource

huayanYu commented 5 months ago

4.3.1