myBatis-plus异常提示For input string: "{0=null}"

异常信息

 1 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
 2 ### Error querying database.  Cause: java.lang.NumberFormatException: For input string: "{0=null}"
 3 ### Cause: java.lang.NumberFormatException: For input string: "{0=null}"
 4     at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77) ~[mybatis-spring-1.3.1.jar:1.3.1]
 5     at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-1.3.1.jar:1.3.1]
 6     at com.sun.proxy.$Proxy23.selectList(Unknown Source) ~[na:na]
 7     at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230) ~[mybatis-spring-1.3.1.jar:1.3.1]
 8     at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137) ~[mybatis-3.4.5.jar:3.4.5]
 9     at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75) ~[mybatis-3.4.5.jar:3.4.5]
10     at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59) ~[mybatis-3.4.5.jar:3.4.5]
11     at com.sun.proxy.$Proxy25.getDataList(Unknown Source) ~[na:na]
12     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
13     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
14     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
15     at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
16     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
17     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
18     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
19     at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51) ~[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
20     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
21     at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) ~[spring-tx-3.2.9.RELEASE.jar:3.2.9.RELEASE]
22     at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) ~[spring-tx-3.2.9.RELEASE.jar:3.2.9.RELEASE]
23     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) ~[spring-tx-3.2.9.RELEASE.jar:3.2.9.RELEASE]
24     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
25     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
26     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
27     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ~[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
28     at com.sun.proxy.$Proxy27.getDataList(Unknown Source) ~[na:na]
29     at com.eshore.wbtimer.executor.service.impl.TGUploadSettingService.getDataList(TGUploadSettingService.java:56) ~[classes/:na]
30     at com.eshore.wbtimer.executor.handler.DataHandler.checkAndSend(DataHandler.java:82) ~[classes/:na]
31     at com.eshore.wbtimer.executor.handler.DataHandler.execute(DataHandler.java:191) ~[classes/:na]
32     at com.eshore.wbtimer.executor.handler.DataHandler$$FastClassBySpringCGLIB$$34db720e.invoke(<generated>) ~[spring-core-3.2.9.RELEASE.jar:na]
33     at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
34     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:700) ~[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
35     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
36     at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51) ~[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
37     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
38     at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) ~[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
39     at com.eshore.wbtimer.common.aspect.HandlerAspect.around(HandlerAspect.java:50) ~[wbtimer-common-1.0-SNAPSHOT.jar:na]
40     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
41     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
42     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
43     at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
44     at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
45     at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
46     at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
47     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
48     at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
49     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
50     at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
51     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
52     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
53     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
54     at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE]
55     at com.eshore.wbtimer.executor.handler.DataHandler$$EnhancerBySpringCGLIB$$2f633387.execute(<generated>) [spring-core-3.2.9.RELEASE.jar:na]
56     at com.eshore.wbtimer.core.thread.JobThread.run(JobThread.java:135) [wbtimer-core-1.0-SNAPSHOT.jar:na]
57 Caused by: org.apache.ibatis.exceptions.PersistenceException: 
58 ### Error querying database.  Cause: java.lang.NumberFormatException: For input string: "{0=null}"

解决办法:

在<when test=""></when>标签中接收参数的时候test中去掉#{}直接写上参数的名称就可以了<if test=""></if>也是一样!!!!

posted @ 2019-03-21 11:27  柠檬味的橘子皮  阅读(2291)  评论(0编辑  收藏  举报