Announcement Announcement Module
Collapse
No announcement yet.
Properties Token Replacement in child context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Properties Token Replacement in child context

    Hi,
    As per the documentation, a PropertiesPlaceHolderConfigurer declared in a parent application context should replace the tokens in a child application context.
    It doesn't seem to be the case.
    I have a PropertiesPlaceHolderConfigurer declared in my parent application context. For the object definitions within the same context, all the tokens are replaced.
    However, when i instantiate a child application context, set its parent the one with the PropertiesPlaceHolderConfigurer, the tokens of the object definitions in the child context aren't replaced.
    Having looked through the source code, the registration of post processors seem to include IObjectFactoryPostProcessor only from the current application context.

    This seem to contradict the below statement in the documentation:
    ================================================== ========
    The lookup of external property values follows the same logic, so it is possible to replace properties with
    values that are available in the parent context.
    So if the application context holds an external property by the name of prop1 it is possible declare an
    object definition in the module context like this:
    <objects>
    <object class="com.moduleclasses.MyObjectWithAProperty" id="myObjectWithAProperty">
    <property name="myProperty" value="{$prop1}"/>
    </object>
    </objects>
    ================================================== ========
    Appreciate your comments.

    Please note the object look up does include the parent application context. No problems with that.

  • #2
    bug

    Hey there,

    thanks for bringing this up, this does sound like a bug indeed. Can you please submit a bug report in JIRA?

    https://jira.springframework.org/bro...ACTIONSCRIPTAS

    That way we won't forget about it and we'll try and get to fix it as soon as time permits.

    cheers,

    Roland
    Last edited by 666shooter; Sep 18th, 2010, 02:54 PM.

    Comment

    Working...
    X