数据库切源时加@DataSource

   数据库切源时加@DataSource在Service上
   要记得如果用MybatisPlus切源时要想生效!!!不能!!!在controller层直接调MybatisPlus的service方法,因为这里调的是IService的方法!!!

  要在service层写个方法来调,然后在这个方法里面调MybatisPlus的Mapper方法才会生效

!!!

猜你喜欢

转载自blog.csdn.net/qq_40202111/article/details/105776000