spring整合mybatis配置sqlSessionFactory时是否要配置mapperLocations
当mybatis的xml文件和mapper接口不在相同包下时,需要用mapperLocations属性指定xml文件的路径。
*是个通配符,代表所有的文件,**代表所有目录下
但是当mybatis的xml文件和mapper接口在相同包下时,不需要配置mapperLocations属性指定xml文件的路径
当mybatis的xml文件和mapper接口不在相同包下时,需要用mapperLocations属性指定xml文件的路径。
*是个通配符,代表所有的文件,**代表所有目录下
但是当mybatis的xml文件和mapper接口在相同包下时,不需要配置mapperLocations属性指定xml文件的路径