Announcement Announcement Module
Collapse
No announcement yet.
How can I suppress expression evaluation in xml bean property values? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I suppress expression evaluation in xml bean property values?

    Hi,

    I have a text literal "some text #{user.name} more text", which I want to inject in a Spring bean.

    However, I get a

    Code:
    org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'user' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext'
    because the container tries to evaluate the value as an EL expression. Is there a way to escape the special characters #{} and treat this value as a literal string??? It's giving me such a headache Thanks!!

    -N
Working...
X