码迷,mamicode.com
首页 > Web开发 > 详细

【Mybatis异常】 org.apache.ibatis.binding.BindingException: Parameter 'storeId' not found. Available parameters are [form, param1]

时间:2019-06-01 21:08:58      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:解决   tor   http   exec   sys   nested   support   ring   cal   

一、异常信息

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. Available parameters are [form, param1]

标签:解决   tor   http   exec   sys   nested   support   ring   cal   

原文地址:https://www.cnblogs.com/756623607-zhang/p/10960787.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!