Announcement Announcement Module
Collapse
No announcement yet.
PropertyOverrideConfigurer and Properties-type properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • PropertyOverrideConfigurer and Properties-type properties

    Forgive the alliteration

    Is it possible to use the PropertyOverrideConfigurer to set props like the following:

    Code:
    ...
    <property name="emailProperties">
                <props>
                    <prop key="mail.smtp.port">25</prop>
                    <prop key="mail.smtp.host">localhost</prop>
                </props>
    
            </property>
    ...
    Not sure how the bean.property syntax would be applied here from a .properties file

    [/code]

  • #2
    An override configurer overrides bean properties:

    Code:
    <bean id="myObject" class="MyObject">
      <property name="lastName"><value>Arendsen</value></property>
    </bean>
    If you include 'myObject.lastName=Doe' as a property here alongside your override configurer, the lastName property will be overridden. So in other words, no, it doesn't work with system properties like mail.smtp.host.

    Of course you can override those properties if you construct a mail session through spring and mentioning the right properies alongside the property override configurer's properties.

    regards,
    Alef Arendsen

    Comment


    • #3
      That's what I figured.
      The bean in question is not using Spring's mail functionality, but I may be able to quickly refactor it to do so.

      Thanks.

      Comment

      Working...
      X