Mybatis异常 org.apache.ibatis.binding.BindingException: Parameter 'storeId' not found. Avail(代

Posted 756623607-zhang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mybatis异常 org.apache.ibatis.binding.BindingException: Parameter 'storeId' not found. Avail(代相关的知识,希望对你有一定的参考价值。

一、异常信息

2019-05-31 16:06:25.272 [http-nio-10650-exec-3] WARN  o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver.logException(AbstractHandlerExceptionResolver.java:192) - Resolved exception caused by Handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘storeId‘ not found. Available parameters are [form, param1]
2019-05-31 16:06:36.665 [http-nio-10650-exec-4] ERROR c.x.xcauto.common.controller.BaseControllerAdvice.globalExceptionHandler(BaseControllerAdvice.java:33) - 检测到未捕捉异常:IP:0:0:0:0:0:0:0:1 invoke url:http://localhost:10650/material-requisition/list/v1 Exception:public class org.mybatis.spring.MyBatisSystemException
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘storeId‘ not found. Available parameters are [form, param1]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
    at com.sun.proxy.$Proxy176.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
    at com.sun.proxy.$Proxy177.getMaterialRequisitionList(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)

 

二、解决办法:

 @Param注解去掉就可以,实现直接从对象中通过#,获取属性值

以上是关于Mybatis异常 org.apache.ibatis.binding.BindingException: Parameter 'storeId' not found. Avail(代的主要内容,如果未能解决你的问题,请参考以下文章

mybatis异常

Mybatis 异常(SQL 语法异常 ambiguous)

mybatis查询oracle数据库数据异常

mybatis数据绑定异常

mybatis与 Exception

当在mybatis用到foreach的时候异常