Announcement Announcement Module
Collapse
No announcement yet.
How to provide default values for bean if properties file contains null value Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to provide default values for bean if properties file contains null value

    Hi,

    How to handle exception at bean creating i. e if setter method is throwing exception I need to catch that exception in xml file.

    <bean id="resolver"
    class="ServiceBrokerResolver">
    <property name="serviceBrokerHosts" value="${serviceBroker.hosts}" />
    <property name="regDomain" value="${ois.domain}" />
    <property name="regServices">
    <list>
    <value>mail</value>
    <value>indexing</value>
    </list>
    </property>
    </bean>

    In the above bean if setter method of serviceBrokerHosts throws exception because serviceBroker.hosts value is null (values are picked from properties file), so I need to set some default values if value is null.

    Please provide any pointers for this issue?

    Thanks,
    Bhanu.

  • #2
    This sounds like a question for the Core Container forum, not the Spring Web Flow forum.

    Comment


    • #3
      ok thanks.

      Comment

      Working...
      X