Invoking methods using expression language
In my spring's config I need invoke method "get" (java.lang.ThreadLocal'开发者_Go百科s instance object). How I can do it without creating new class with "correct" method's naming (smt like "getValue" instead of "get")?
Thanks.
You can't. EL is following the JavaBeans convention. You have two options:
- define a custom JSTL function that retrieves the objects
- create a wrapper class the has, say,
getThreadLocalValue()
and access it viabean.threadLocalValue
精彩评论