使用solon.data.dynamicds实现动态数据源,失效了
@DynamicDs("slave")
@Override
public void saveYlbsq(List<ScrqDto.Payload.Snapshots> snapshots, String deviceCode, JgsDevice jgsDevice)
最终发现是加了事务导致的
@Tran
public boolean jgs(ScrqDto scrqDto)
通过和作者沟通,改成两个固定数据源
Mybatis.use("name").getMapper(Xxx.clase)
这个方案,不是由线程状态切换的。。。相当靠普