mapper如何加namespace
在Mapper接口上使用@Mapper注解,并指定namespace属性,即可为Mapper接口添加命名空间。
示例代码如下:
@Mapper(namespace = "com.example.mapper")
public interface UserMapper {
// Mapper方法...
}
在上述示例中,UserMapper接口的命名空间被设置为com.example.mapper。
原文地址: https://www.cveoy.top/t/topic/ihGX 著作权归作者所有。请勿转载和采集!