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

jpa多层数据源嵌套切换失效 。(ServiceA >>> ServiceB >>> ServiceC)。 #575

Closed zlyou closed 1 year ago

zlyou commented 1 year ago

Please fill it out carefully, or it will be closed. 请认真填写,不然会直接关闭。

Enviroment

JDK Version(required): jdk17

SpringBoot Version(required): 3.1.0

dynamic-datasource-spring-boot-starter Version(required):v4.1.3

druid Version(optional):1.2.17

Describe what happened

Expected Result: jpa多层数据源嵌套切换失效 。(ServiceA >>> ServiceB >>> ServiceC)。 ServiceB 对应的数据库master ServiceC对应的数据库slave 当执行ServiceC方法使用的是库slave Actual Result: 期望ServiceB 使用库master 期望ServiceC使用库slave If there is an exception,or aop invalid,please attach the exception trace:

Just paste your stack trace here!

Steps to reproduce

huayanYu commented 1 year ago

jpa 自帶事務,得找JPA支持