前言,这里是参考mybaties plus官方实现,效果很不错,下面是实现大概过程: 1、引入依赖: <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-sta