SQLException: Parameter index out of range (1 > number of parameters, which is 0).异常

今天在编写mybatsi编写like模糊查询的时候遇到一个报错,关于 Parameter index out of 异常,问题是这样的,在网上找了一下复制粘贴,果然没让我失望,报错

后来进过查百度,终于解决了........要是你遇到这样的问题,希望我的解决办法能帮到你!

解决的办法可以是这样........ 

WHERE channel_name LIKE CONCAT('%',#{channelName},'%')

猜你喜欢

转载自blog.csdn.net/CoreyXuu/article/details/81987990