EL1041E:(pos 2): After parsing a valid expression
来源:互联网 发布:数据恢复软件的应用 编辑:程序博客网 时间:2024/06/09 19:14
Spring4.2 下载官网文档中给的代码:
ExpressionParser parser = new SpelExpressionParser();Expression exp = parser.parseExpression("''Hello World''");String message = (String) exp.getValue();
测试代码:
public static void main(String[] args) { ExpressionParser parser = new SpelExpressionParser(); Expression exp = parser.parseExpression("''Hello World''"); System.out.println(exp.getValue(String.class)); }
运行抛错:
Exception in thread "main" org.springframework.expression.spel.SpelParseException: EL1041E:(pos 2): After parsing a valid expression, there is still more data in the expression: 'Hello' at org.springframework.expression.spel.standard.InternalSpelExpressionParser.doParseExpression(InternalSpelExpressionParser.java:129) at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:60) at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:32) at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:76) at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:62) at com.mxsm.spring.spel.SpringSpel1.main(SpringSpel1.java:20)
查看在线的Spring文档发现
"''Hello World''"(下载的文档)在线文档"'Hello World'"
把字符串替换下就能正常运行了!
这个问题不知道是不是Spring4.2 离线文档有问题。反正我下载的离线文档是这样一个的。
0 0
- EL1041E:(pos 2): After parsing a valid expression
- Parsing a postfix expression in C#, my naive approach
- Error parsing reference: "Pxxxxxx" is not a valid repository/tag
- ORA-01791: not a SELECTed expression after upgrade to 11.2.0.4 (文档 ID 1600974.1)
- Error parsing XML: junk after document element
- A. Expression
- A. Expression
- 关于java调用webservice异常 the char 'ox1e' after '' is not a valid xml character
- Error parsing reference: "reg.docker.alibaba-inc.com/v2/swarmNew:new" is not a valid repository/tag
- Codeforces Round #274 (Div. 2) --A Expression
- Codeforces Round #274 (Div. 2) A. Expression
- Codeforces Round #274 (Div. 2) a Expression
- 【Codeforces Round 354 (Div 2)A】【水题 贪心】Nicholas and Permutation 恰好交换一次的pos[n]-pos[1]
- Error parsing XML: junk after document element这样的错误
- parsing restarts here after previous syntax error错误
- contains invalid expression(s): javax.el.ELException: Error Parsing
- Caused by: org.springframework.beans.factory.BeanExpressionException: Expression parsing failed;
- Tutorial 2: Detecting a Valid PE File
- cacti监控mysql 主从复制
- myBatis源码学习之SqlSession
- window 下 MySQL免安装使用
- 第十三周 Floyd算法验证
- 数据结构:二叉树
- EL1041E:(pos 2): After parsing a valid expression
- YiiBooster使用:booster.helpers.TbHtml的AjaxSubmitButton bug修复
- myBatis源码之XMLConfigBuilder
- Invalid MEX-file: caffe.mexa64 的解决方案
- 【splay】BZOJ 1503 郁闷的出纳员
- js模拟php的shuffle函数,用来打乱一维数组
- C#类型基础----对象判等
- Eclipse中10个最有用的快捷键组合
- myBatis源码之Configuration