记录一次 No signature of method: java.lang.String.mod() is applicable for argument types: (java.lang.Integer) values: [2] 异常!!!
springboot 整合 sharedingjdbc的时候出现的这个错误
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause:groovy.lang.MissingMethodException:No signature of method:java.lang.String.mod() is applicable for argument types:(java.lang.Integer) values:[2]Possible solutions:drop(int),any(),find(),is(java.lang.Object),use([Ljava.lang.Object;),any(groovy.lang.Closure)
### The error may exist in com/zdd/main/mapper/SysUserMapper.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL:SELECT id,dept_id,name,user_name,email,phone_number,sex,avatar,password,salt,birthday,status,del_falg,login_ip,login_date,create_time,update_by,remark FROM sys_user WHERE id=?
### Cause:groovy.lang.MissingMethodException:No signature of method:java.lang.String.mod() is applicable for argument types:(java.lang.Integer) values:[2]Possible solutions:drop(int),any(),find(),is(java.lang.Object),use([Ljava.lang.Object;),any(groovy.lang.Closure)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)~[mybatis-spring-2.0.5.jar:2.0.5]
at com.sun.proxy.$Proxy80.selectOne(UnknownSource)~[na:na]
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159)~[mybatis-spring-2.0.5.jar:2.0.5]
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:90)~[mybatis-plus-core-3.4.0.jar:3.4.0]
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)~[mybatis-plus-core-3.4.0.jar:3.4.0]
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)~[mybatis-plus-core-3.4.0.jar:3.4.0]
at com.sun.proxy.$Proxy88.selectById(UnknownSource)~[na:na]
at com.zdd.main.impl.UserInfoServiceImpl.getByToken(UserInfoServiceImpl.java:32)~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_381]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_381]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_381]
at java.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_381]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)~[spring-web-5.3.29.jar:5.3.29]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)~[spring-web-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)~[spring-webmvc-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)~[spring-webmvc-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)~[spring-webmvc-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)~[spring-webmvc-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)~[spring-webmvc-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)~[spring-webmvc-5.3.29.jar:5.3.29]
at org.springframework.web.servlet.FrameworkServlet