代碼幾乎一樣,為啥這個xml配置的就會出現莫名其妙的問題呢
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='mybatis_plus_first', mode=IN, javaType=long, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #3 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2).
?? ?at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97)
?? ?at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
?? ?at com.sun.proxy.$Proxy131.selectList(Unknown Source)
?? ?at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
?? ?at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForIPage(MybatisMapperMethod.java:121)
?? ?at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:85)
?? ?at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152)
?? ?at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
?? ?at com.sun.proxy.$Proxy237.getSearchIndexByPage(Unknown Source)
?? ?at com.bigdatacd.panorama.system.service.impl.SearchIndexServiceImpl.getSearchIndexByPage(SearchIndexServiceImpl.java:31)
?? ?at com.bigdatacd.panorama.system.service.impl.SearchIndexServiceImpl$$FastClassBySpringCGLIB$$bb45ed4a.invoke(<generated>)
?? ?at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
?? ?at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
?? ?at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
?? ?at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
?? ?at com.baomidou.dynamic.datasource.aop.DynamicDataSourceAnnotationInterceptor.invoke(DynamicDataSourceAnnotationInterceptor.java:57)
?? ?at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
?? ?at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
?? ?at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
?? ?at com.bigdatacd.panorama.system.service.impl.SearchIndexServiceImpl$$EnhancerBySpringCGLIB$$3684ef87.getSearchIndexByPage(<generated>)
?? ?at com.bigdatacd.panorama.system.controller.SearchIndexController.getSearchIndexByPage(SearchIndexController.java:40)
?? ?at com.bigdatacd.panorama.system.controller.SearchIndexController$$FastClassBySpringCGLIB$$cc3a314a.invoke(<generated>)
?? ?at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
最后,發現xml的注釋 如-- 這樣的會引起解析分頁失敗好吧,不追究了奇奇怪怪的問題