Announcement Announcement Module
Collapse

JavaConfig forum decommissioned in favor of Core Container

As described at

http://static.springsource.org/sprin...fig/README.TXT

key features of the Spring JavaConfig project have been migrated into the core Spring Framework as of version 3.0.

Please see the Spring 3.0 documentation on @Configuration and @Bean support:

http://static.springsource.org/sprin...tml#beans-java

For any questions related to @Configuration classes and @Bean methods in Spring 3.0, please post in the dedicated 'Core Container' forum at

http://forum.springsource.org/forumdisplay.php?f=26
See more
See less
How to use ExposablePropertyPaceholderConfigurer for properties with static refereces Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use ExposablePropertyPaceholderConfigurer for properties with static refereces

    Hi ,
    I was trying to use the convinient property Configurer that spring produced for initializing a propery table for my application , Here is the code :

    private static ExposablePropertyPaceholderConfigurer _CONFIGURER;

    public void setPropertyPlaceholderConfigurer (ExposablePropertyPaceholderConfigurer propertyPlaceholderConfigurer) {
    _CONFIGURER = propertyPlaceholderConfigurer;
    }

    public static String getProperty(String name) {
    return _CONFIGURER.getResolvedProperty(name);
    }


    But I also want to enjoy an eazy way to call it ,using a static reference, but because I configured it with spring I allways have to use with this configurer property , a dependency injection , which is dirty (cause I use those property with allmost 50 classes , so I have to set in 50 beans in the xml this specific property).
    There is got to be a way, make a simple reference like Properties.getProperty("something")
    instead call a private member setted by injection...

    Help pleaseeee
    thnx
Working...
X