springboot+mybatis多数据源
首先,既然是多数据源,那么我们就先看下数据源怎么配置的: javaconfig类似下面这样: MapperScan注解常用配置如下: basePackages:Base packages to scan for MyBatis interfaces,也就是mapper接口所在包名 annotationClass:This property specifies the annotation that the scanner will search for, 也就是只扫描指定包下的指定注解作为mapper,通常为org.apache.ibatis.annotations.Mapper markerInterface:This property specifies the parent that the scanner will search for,只扫描指定包下指定父接口的子接口作为mapper sqlSessionTemplateRef:指定这组mapper关联的sqlSessionTemplate sqlSessionFactoryRef:指定这组mapper关联的sqlSessionFactory 那么,问题来了,annotationClass,markerInterface都配置了或者都不配置会怎样?在org.mybatis.spring.annotation