SpelExpressionProcessor { public <T> T process(String expressionString, Class<T> clazz) { if (expressionString == null) { return null; } Expression expression = parser.parseExpression(expressionString, templateContext); return expression.getValue(context, clazz); } SpelExpressionProcessor(PropertyResolver resolver); T process(String expressionString, Class<T> clazz);  }
@Test public void parse() throws Exception { assertThat(spelExpressionProcessor.process("#{ #var1 }", String.class)).isEqualTo("var1 value"); assertThat(spelExpressionProcessor.process("#{ #var2 }", Object.class)).isEqualTo(ImmutableMap.of("sub", "subvar value")); assertThat(spelExpressionProcessor.process("#{true == true}", Boolean.class)).isEqualTo(true); assertThat(spelExpressionProcessor.process("#{true == false}", Boolean.class)).isEqualTo(false); }