@MapperScan注解

以前是,直接在Mapper类上面添加注解@Mapper,这种方式要求每个mapper类都须要添加此注解,麻烦。 app 经过使用@MapperScan能够指定要扫描的Mapper类的包的路径,好比:spa @SpringBootApplication @MapperScan("com.lz.water.monitor.mapper") // 添加对mapper包扫描 public class Ap
相关文章
相关标签/搜索