首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

registerFunction步骤使用

2012-07-27 
registerFunction方法使用ExpressionParser parser new SpelExpressionParser()StandardEvaluationCont

registerFunction方法使用

ExpressionParser parser = new SpelExpressionParser();StandardEvaluationContext context = new StandardEvaluationContext();context.registerFunction("reverseString", StringUtils.class.getDeclaredMethod("reverseString", new Class[] { String.class }));String helloWorldReversed = parser.parseExpression("#reverseString('hello')").getValue(context, String.class);

热点排行