Announcement Announcement Module
Collapse
No announcement yet.
SpringAS 2 and FlexPropertyPlaceholderConfigurer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SpringAS 2 and FlexPropertyPlaceholderConfigurer

    I'm trying out SpringAS2 on our SpringAS 1 application to see whether it can benefit us in a major way (in terms of performance). However I'm running into a problem where the FlexPropertyPlaceholderConfigurer cannot be resolved in SpringAS 2. What happened to this class and is there a replacement for it?

    Thanks

  • #2
    Hi Yennick,

    you can load external properties via the "property" tag and by specifying the "file" attribute. You can optionally set the properties to be required or not.

    <property file="properties/application.properties" required="true"/>
    <property file="properties/connection.properties" required="false"/>

    You can also add properties at runtime via the propertiesProvider in the application context instance:

    _applicationContext.propertiesProvider.setProperty ( "host", _host );
    _applicationContext.propertiesProvider.setProperty ( "port", _port.toString() );

    regards,
    Christophe

    Comment


    • #3
      awesomely simple, much better than the FlexPropertyPlaceholderConfigurer, thanks

      Comment

      Working...
      X