|
|
PropertyOverrideConfigurer VS PropertyPlaceholderConfigurer
mon.InnovationContextquot; singleton=quot;truequot;gt; lt;property name=quot;snDatequot;gt; lt;valuegt;offlt;/valuegt; lt;/propertygt; lt;/beangt;
I also has a propertyOverrideConfigurrer defined. Lets have it as myApplication.properties.
I override snDate in myApplication.properties as
innovationContext.snDate=09-11-2009
but when I access the snDate in controller like below,Code String)request.getSession().getServletContext().getAttribute(quot;snDatequot;)
it returns quot;offquot; instead of 09-11-2009.
I guess that before even my properyOverrideConfigurer override the bean, snDate is been set into servletContext. Is that correct? If so will it be solved by using propertyPlaceConfigHolder? Also can't I have both in my application?
Thanks,
Harish |
|