Announcement Announcement Module
Collapse
No announcement yet.
property-variable and default value Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • property-variable and default value

    Hi,
    I have a property that I want to define using a variable, something like this:

    <bean id="someId" class="package.SomeClass" >
    <property name="someProperty" value="${user.myProperty}" />
    </bean>

    What I would like to do is that if user.Property does exist, then it is used but if it does not, then some default value is used instead. I cannot just set some default value in the class as it is a class coming from some outside package, not my own.

    Is there a way to do this?

    Thanks,
    Llaurick

  • #2
    You can use the PropertyOverrideConfigurer as described here: http://static.springframework.org/sp...rideconfigurer

    Comment

    Working...
    X