Mybatis-PageHelper icon indicating copy to clipboard operation
Mybatis-PageHelper copied to clipboard

开启异步count后,多数据源模式下异步count的数据源是默认库的

Open ChickenWingOne opened this issue 8 months ago • 1 comments

使用环境

pageHelper: 6.1.1 pagehelper-spring-boot-start: 2.1.1

多数据源切换配置

Image

异步count获取数据源地方,永远是默认库的数据源

Image

ChickenWingOne avatar Aug 26 '25 12:08 ChickenWingOne

如果你指定的数据源是通过线程绑定实现的,就不要开启异步,异步线程中没有你指定的数据源信息。

abel533 avatar Aug 27 '25 01:08 abel533