当前位置: 代码迷 >> GIS >> registerFunction步骤使用
  详细解决方案

registerFunction步骤使用

热度:222   发布时间:2016-05-05 06:29:48.0
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);
  相关解决方案