Code first
@Test public void tryUnicode() { SpelExpressionParser parser = new SpelExpressionParser(); Object rootObject = new Object() { public String getName() { return "wener"; } public String get名字() { return getName(); } };
For some time, we just need a Unicode name, it is more friendly to our custom in the template. Spel is simple, simple and built-in, I do not want to use another EL solution, how can I solve this problem?
EDIT
In org.springframework.expression.spel.standard.Tokenizer#isIdentifier they only accept isAlphabetic(ch) || isDigit(ch) || ch == '_' || ch == '$'; isAlphabetic(ch) || isDigit(ch) || ch == '_' || ch == '$'; unicode support, but java id allowed unicode, sad.
wener source share