在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

IllegalArgumentException: Name for parameter binding must not be null

@Query("select emp from EmployeeEntity emp where  emp.name= :name and emp.age= :age")//1,2表示占位符
    public List queryParam2(@Param("name") String name, @Param("age") Integer age);


测试时,不能通过,报错如下:IllegalArgumentException: Name for parameter binding must not be null or empty! On JDKs < 8, you nee...


但是改成 占位符形式通过,求解?

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与1

sql语句你不写占位符绑定参数是null,肯定无效参数啊!!还有sql语句你要传参数必须要有占位符,不管是使用jdbc的 ‘?’或者mybatis中 的OGNL表达式或者EL表达式

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册