springboot连接两个数据源,来回切换数据不能保存?
解决方案 换事务
import org.springframework.transaction.annotation.Transactional;
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
换为
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
@DSTransactional