解决mybatis-plus3.1.1版本使用lambda表达式查询报错的方法
最近项目中使用了mybatis-plus3.1.1版本,发现使用lambda表达式方式的条件构造器,执行时会报错;但是我用单元测试却通过,真是一个大坑啊。经过在网上一顿猛查,发现压根就是没有找到类似的问题,所以今天就记录一下这个大坑。
测试代码:
@Override publicUsergetByUsername(Stringusername){ returnsuper.getOne(newQueryWrapper().lambda().eq(User::getUsername,username)); }
先看看报错如下:
org.mybatis.spring.MyBatisSystemException:nestedexceptionisorg.apache.ibatis.builder.BuilderException:Errorevaluatingexpression'ew.sqlSegment!=nullandew.sqlSegment!=''andew.nonEmptyOfWhere'.Cause:org.apache.ibatis.ognl.OgnlException:sqlSegment[com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Yourpropertynamed"username"cannotfindthecorrespondingdatabasecolumnname!] atorg.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)~[mybatis-spring-2.0.1.jar:2.0.1] atorg.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)~[mybatis-spring-2.0.1.jar:2.0.1] atcom.sun.proxy.$Proxy62.selectOne(UnknownSource)~[na:na] atorg.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)~[mybatis-spring-2.0.1.jar:2.0.1] atcom.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:62)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.sun.proxy.$Proxy63.selectOne(UnknownSource)~[na:na] atcom.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:259)~[mybatis-plus-extension-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:192)~[mybatis-plus-extension-3.1.1.jar:3.1.1] atcom.kalvin.layoa.service.oa.UserServiceImpl.getByUsername(UserServiceImpl.java:42)~[classes/:na] atcom.kalvin.layoa.comm.shiro.UserRealm.doGetAuthenticationInfo(UserRealm.java:108)~[classes/:na] atorg.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:571)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:274)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:260)[shiro-core-1.4.0.jar:1.4.0] atcom.kalvin.layoa.controller.LoginController.login(LoginController.java:57)[classes/:na] atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_131] atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_131] atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_131] atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_131] atorg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atjavax.servlet.http.HttpServlet.service(HttpServlet.java:660)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atjavax.servlet.http.HttpServlet.service(HttpServlet.java:741)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)[tomcat-embed-websocket-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atcom.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)[druid-1.1.10.jar:1.1.10] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcat-embed-core-9.0.17.jar:9.0.17] atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_131] atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_131] atorg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-9.0.17.jar:9.0.17] atjava.lang.Thread.run(Thread.java:748)[na:1.8.0_131] Causedby:org.apache.ibatis.builder.BuilderException:Errorevaluatingexpression'ew.sqlSegment!=nullandew.sqlSegment!=''andew.nonEmptyOfWhere'.Cause:org.apache.ibatis.ognl.OgnlException:sqlSegment[com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Yourpropertynamed"username"cannotfindthecorrespondingdatabasecolumnname!] atorg.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:48)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:34)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atjava.util.ArrayList.forEach(ArrayList.java:1249)~[na:1.8.0_131] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.TrimSqlNode.apply(TrimSqlNode.java:55)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atjava.util.ArrayList.forEach(ArrayList.java:1249)~[na:1.8.0_131] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:35)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atjava.util.ArrayList.forEach(ArrayList.java:1249)~[na:1.8.0_131] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:39)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:297)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)~[mybatis-3.5.1.jar:3.5.1] atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_131] atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_131] atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_131] atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_131] atorg.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)~[mybatis-spring-2.0.1.jar:2.0.1] ...88commonframesomitted Causedby:org.apache.ibatis.ognl.OgnlException:sqlSegment atorg.apache.ibatis.ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1693)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:147)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2719)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:114)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTChain.getValueBody(ASTChain.java:141)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:50)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:61)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.Ognl.getValue(Ognl.java:493)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.Ognl.getValue(Ognl.java:457)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:46)~[mybatis-3.5.1.jar:3.5.1] ...112commonframesomitted Causedby:com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Yourpropertynamed"username"cannotfindthecorrespondingdatabasecolumnname! atcom.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:49)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.lambda$getColumn$1(AbstractLambdaWrapper.java:86)~[mybatis-plus-core-3.1.1.jar:3.1.1] atjava.util.Optional.orElseThrow(Optional.java:290)~[na:1.8.0_131] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.getColumn(AbstractLambdaWrapper.java:85)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.columnToString(AbstractLambdaWrapper.java:65)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.columnToString(AbstractLambdaWrapper.java:61)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.columnToString(AbstractLambdaWrapper.java:39)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractWrapper.lambda$addCondition$ac69df92$1(AbstractWrapper.java:324)~[mybatis-plus-core-3.1.1.jar:3.1.1] atjava.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)~[na:1.8.0_131] atjava.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)~[na:1.8.0_131] atjava.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)~[na:1.8.0_131] atjava.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)~[na:1.8.0_131] atjava.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)~[na:1.8.0_131] atjava.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)~[na:1.8.0_131] atjava.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)~[na:1.8.0_131] atcom.baomidou.mybatisplus.core.conditions.segments.NormalSegmentList.childrenSqlSegment(NormalSegmentList.java:89)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.segments.AbstractISegmentList.getSqlSegment(AbstractISegmentList.java:96)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.segments.MergeSegments.getSqlSegment(MergeSegments.java:72)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractWrapper.getSqlSegment(AbstractWrapper.java:425)~[mybatis-plus-core-3.1.1.jar:3.1.1] atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_131] atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_131] atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_131] atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_131] atorg.apache.ibatis.ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:881)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1691)~[mybatis-3.5.1.jar:3.5.1] ...130commonframesomitted 2019-05-0910:55:54.430ERROR16844---[p-nio-80-exec-4]c.k.layoa.controller.BaseController:Authenticationfailedfortokensubmission[org.apache.shiro.authc.UsernamePasswordToken-admin,rememberMe=false].Possibleunexpectederror?(TypicalorexpectedloginexceptionsshouldextendfromAuthenticationException). org.apache.shiro.authc.AuthenticationException:Authenticationfailedfortokensubmission[org.apache.shiro.authc.UsernamePasswordToken-admin,rememberMe=false].Possibleunexpectederror?(TypicalorexpectedloginexceptionsshouldextendfromAuthenticationException). atorg.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:214)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:274)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:260)[shiro-core-1.4.0.jar:1.4.0] atcom.kalvin.layoa.controller.LoginController.login(LoginController.java:57)~[classes/:na] atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_131] atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_131] atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_131] atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_131] atorg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atjavax.servlet.http.HttpServlet.service(HttpServlet.java:660)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE] atjavax.servlet.http.HttpServlet.service(HttpServlet.java:741)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)[tomcat-embed-websocket-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)[shiro-web-1.4.0.jar:1.4.0] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atcom.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)[druid-1.1.10.jar:1.1.10] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)[tomcat-embed-core-9.0.17.jar:9.0.17] atorg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcat-embed-core-9.0.17.jar:9.0.17] atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_131] atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_131] atorg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-9.0.17.jar:9.0.17] atjava.lang.Thread.run(Thread.java:748)[na:1.8.0_131] Causedby:org.mybatis.spring.MyBatisSystemException:nestedexceptionisorg.apache.ibatis.builder.BuilderException:Errorevaluatingexpression'ew.sqlSegment!=nullandew.sqlSegment!=''andew.nonEmptyOfWhere'.Cause:org.apache.ibatis.ognl.OgnlException:sqlSegment[com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Yourpropertynamed"username"cannotfindthecorrespondingdatabasecolumnname!] atorg.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)~[mybatis-spring-2.0.1.jar:2.0.1] atorg.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)~[mybatis-spring-2.0.1.jar:2.0.1] atcom.sun.proxy.$Proxy62.selectOne(UnknownSource)~[na:na] atorg.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)~[mybatis-spring-2.0.1.jar:2.0.1] atcom.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:62)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.sun.proxy.$Proxy63.selectOne(UnknownSource)~[na:na] atcom.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:259)~[mybatis-plus-extension-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:192)~[mybatis-plus-extension-3.1.1.jar:3.1.1] atcom.kalvin.layoa.service.oa.UserServiceImpl.getByUsername(UserServiceImpl.java:42)~[classes/:na] atcom.kalvin.layoa.comm.shiro.UserRealm.doGetAuthenticationInfo(UserRealm.java:108)~[classes/:na] atorg.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:571)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267)~[shiro-core-1.4.0.jar:1.4.0] atorg.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)~[shiro-core-1.4.0.jar:1.4.0] ...75commonframesomitted Causedby:org.apache.ibatis.builder.BuilderException:Errorevaluatingexpression'ew.sqlSegment!=nullandew.sqlSegment!=''andew.nonEmptyOfWhere'.Cause:org.apache.ibatis.ognl.OgnlException:sqlSegment[com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Yourpropertynamed"username"cannotfindthecorrespondingdatabasecolumnname!] atorg.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:48)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:34)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atjava.util.ArrayList.forEach(ArrayList.java:1249)~[na:1.8.0_131] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.TrimSqlNode.apply(TrimSqlNode.java:55)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atjava.util.ArrayList.forEach(ArrayList.java:1249)~[na:1.8.0_131] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:35)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atjava.util.ArrayList.forEach(ArrayList.java:1249)~[na:1.8.0_131] atorg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:39)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:297)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)~[mybatis-3.5.1.jar:3.5.1] atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_131] atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_131] atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_131] atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_131] atorg.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)~[mybatis-spring-2.0.1.jar:2.0.1] ...88commonframesomitted Causedby:org.apache.ibatis.ognl.OgnlException:sqlSegment atorg.apache.ibatis.ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1693)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:147)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2719)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:114)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTChain.getValueBody(ASTChain.java:141)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:50)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:61)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.Ognl.getValue(Ognl.java:493)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.Ognl.getValue(Ognl.java:457)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:46)~[mybatis-3.5.1.jar:3.5.1] ...112commonframesomitted Causedby:com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Yourpropertynamed"username"cannotfindthecorrespondingdatabasecolumnname! atcom.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:49)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.lambda$getColumn$1(AbstractLambdaWrapper.java:86)~[mybatis-plus-core-3.1.1.jar:3.1.1] atjava.util.Optional.orElseThrow(Optional.java:290)~[na:1.8.0_131] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.getColumn(AbstractLambdaWrapper.java:85)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.columnToString(AbstractLambdaWrapper.java:65)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.columnToString(AbstractLambdaWrapper.java:61)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper.columnToString(AbstractLambdaWrapper.java:39)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractWrapper.lambda$addCondition$ac69df92$1(AbstractWrapper.java:324)~[mybatis-plus-core-3.1.1.jar:3.1.1] atjava.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)~[na:1.8.0_131] atjava.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)~[na:1.8.0_131] atjava.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)~[na:1.8.0_131] atjava.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)~[na:1.8.0_131] atjava.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)~[na:1.8.0_131] atjava.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)~[na:1.8.0_131] atjava.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)~[na:1.8.0_131] atcom.baomidou.mybatisplus.core.conditions.segments.NormalSegmentList.childrenSqlSegment(NormalSegmentList.java:89)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.segments.AbstractISegmentList.getSqlSegment(AbstractISegmentList.java:96)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.segments.MergeSegments.getSqlSegment(MergeSegments.java:72)~[mybatis-plus-core-3.1.1.jar:3.1.1] atcom.baomidou.mybatisplus.core.conditions.AbstractWrapper.getSqlSegment(AbstractWrapper.java:425)~[mybatis-plus-core-3.1.1.jar:3.1.1] atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_131] atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_131] atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_131] atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_131] atorg.apache.ibatis.ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:881)~[mybatis-3.5.1.jar:3.5.1] atorg.apache.ibatis.ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1691)~[mybatis-3.5.1.jar:3.5.1] ...130commonframesomitted
经过一翻努力,终于解决了。原来是3.1.1版本自带bug这个bug。把版本换成3.1.0就没问题了。
到此这篇关于解决mybatis-plus3.1.1版本使用lambda表达式查询报错的方法的文章就介绍到这了,更多相关mybatis-pluslambda查询报错内容请搜索毛票票以前的文章或继续浏览下面的相关文章希望大家以后多多支持毛票票!
声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:czq8825#qq.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。