io.grpc.StatusRuntimeException: INTERNAL: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ''. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: [org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
":" ...
"not" ...
"+" ...
"-" ...
"~" ...
"!" ...
"(" ...
"true" ...
"false" ...
"null" ...
"#this" ...
"#root" ...
"#" ...
"[" ...
"{" ...
"@" ...
"new" ...
<IDENT> ...
<DYNAMIC_SUBSCRIPT> ...
"\'" ...
"`" ...
"\"" ...
<INT_LITERAL> ...
<FLT_LITERAL> ...
]
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)```
错误原因:
写crud的时候获得了上面的报错,原来是自己在mapper.xml写sql的时候,标签里面的语法写错了,比如我是写错了if标签:xxx,test里面的条件忘了写;也有时写成 xxx,if标签里面不能用&&,应该用and,像这样:xxx。总之,出现上面的错,检查一下if、foreach标签里面语法有没有错误。