使用注解配置时
@Mapper
public interface BrandMapper {
@Select(" select * from tb_brand")
List selectAll();
}
此时无需resources目录下的mapping映射文件,否则报错 Invalid bound statement (not found)
yml中也不可添加映射文件目录,否则sqlsession创建失败

使用注解配置时
@Mapper
public interface BrandMapper {
@Select(" select * from tb_brand")
List selectAll();
}
此时无需resources目录下的mapping映射文件,否则报错 Invalid bound statement (not found)
yml中也不可添加映射文件目录,否则sqlsession创建失败