如上是定义了两个数据源
然后在main方法所在类加上此注解
@MyBadisLoader({"saas = com.llc.admin.web.dao.saas = classpath:mapper/*xml" , "saas2 = com.llc.admin.web.dao.saas2 = classpath:mapper/*.xml,classpath:mapper/user/*.xml"}) @SpringBootApplication public class WebApplication { public static void main(String[] args) { SpringApplication.run(WebApplication.class,args); } }