如果我们在配置类中添加了@MapperScan注解之后是否还需要@Mapper注解?

在添加了@MapperScan注解之后,我们不需要在每一个Mapper接口中添加@Mapper注解,但是需要在MapperScan注解中添加我们编写的mapper文件的位置

@Configuration
@MapperScan(basePackages = "com.just1t.yygh.serviceorder.mapper")
public class OrderConfig {
}
posted @ 2022-12-09 21:30  just1t  阅读(259)  评论(0编辑  收藏  举报