mybatis-包装类模糊查询

1.在sqlMapConfig.xml中对Mapper.xml进行包的引用:

2.Mapper.xml配置模糊查询:

注意:这里的parameterType=""中的值是大小写不敏感的,只能是QueryVo,大小写任意。

QueryVo包装类:包含entity实体的对象

User中省略getXxx(),setXxx()方法。

 

测试得出模糊查询。

猜你喜欢

转载自www.cnblogs.com/doudou-123/p/9340548.html