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