Announcement Announcement Module
Collapse
No announcement yet.
Loading a property's value from resource bundle.. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loading a property's value from resource bundle..

    Hi All,
    I am trying to load a property (application.serverurl)'s value from a file called client.properties.. I am using @Value annotation to inject the value..

    Code:
    @Value("${application.serverurl}")
    protected String appServerURL = null;
    I am using

    Code:
    <context:property-placeholder location="/WEB-INF/conf/spring/client/properties/client.properties" />
    I could able to do it.. But, while starting the server, application looks for the value in various property files which I haven't created also.. They may be present in some jar files.. Do anyone know why this happens ? I will be very thankful, if someone can explain me how to get rid of this problem..

    Code:
    05-31-12 11:13:57.977 DEBUG [e.PropertySourcesPropertyResolver]: Searching for key 'application.serverurl' in [environmentProperties]
    05-31-12 11:13:57.977 DEBUG [e.PropertySourcesPropertyResolver]: Searching for key 'application.serverurl' in [servletConfigInitParams]
    05-31-12 11:13:57.977 DEBUG [e.PropertySourcesPropertyResolver]: Searching for key 'application.serverurl' in [servletContextInitParams]
    05-31-12 11:13:57.977 DEBUG [e.PropertySourcesPropertyResolver]: Searching for key 'application.serverurl' in [jndiProperties]
    Thanks,
    Vivekanand Alampally..
Working...
X