区别:
@Repository 是spring注解 ,需要 @MapperScan("") 扫描mapper类,然后spring创建对象,放入到容器中
@mapper 是mybatis注解,不需要 @MapperScan("") 扫描mapper类,通过 mapper.xml里面的namespace属性对应相关的mapper类,然后spring创建对象,放入到容器中
区别:
@Repository 是spring注解 ,需要 @MapperScan("") 扫描mapper类,然后spring创建对象,放入到容器中
@mapper 是mybatis注解,不需要 @MapperScan("") 扫描mapper类,通过 mapper.xml里面的namespace属性对应相关的mapper类,然后spring创建对象,放入到容器中