开发者社区 问答 正文

mybatis bind标签?报错

mybatis bind标签,要求参数必须是map或者string?为什么我这参数是个自定义bean就报错了?

代码如下:

会提示参数bean没有pattern属性

如果把#{pattern}改为${pattern}就不报错。

官方API

这么写其实是为了mybatis like,用concat('?','%')与oder by 一起使用不走索引的问题(oracle10G)

展开
收起
爱吃鱼的程序员 2020-06-09 13:26:15 693 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <spanstyle="font-size:16px;">欢迎拥抱 <arel="nofollow"><spanstyle="font-size:16px;">mybatis增强工具包 <spanstyle="font-size:16px;">mybatis-plus<spanstyle="line-height:1.5;font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:16px;"> 支持CURDLIKE支持回复<aclass='referer'target='_blank'>@Gooder:支持,请查看mysql测试用例mybatis-puls支持查询字段值中带有%就模糊查询的功能吗问题已解决。。解决方案在http://blog.csdn.net/lq123456789000/article/details/51859562,遇到同样问题的人,可以参考下,记得赞一个哦!

    2020-06-09 13:26:33
    赞同 展开评论