-
Notifications
You must be signed in to change notification settings - Fork 1.1k
RedisHttpSessionConfiguration breaks application due to PropertyPlaceholderConfigurer #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This seems to be the same problem as in #775. Can you attempt to override the |
|
Thanks for the quick feedback @mrusinak - I'll take a closer look at this. |
I apologize, I was incorrect in my previous statement. Setting the ID does allow the application to start properly (didn't notice earlier that my test hadn't actually used the updated spring context). Sorry about that! |
Thanks for the update. So I guess this works around the original problem then? |
It does. Thanks! |
@vpavic Any suggestions to get around this problem if you already have multiple PropertySourcesPlaceholderConfigurer beans with each having 'ignoreUnresolvablePlaceholders' field set to true and a unique id. (Its a legacy app) ? |
@viraj071 Assuming you cannot change the id of any of your existing Does that work for you? |
we are stuck by this issue. in our project, we dont allow duplicated bean definitions. we turn |
thanks@vpavic |
Using Spring Session 1.3.1
RedisHttpSessionConfiguration
defines a defaultPropertyPlaceholderConfigurer
- this can cause an application to fail to initialize if the app defines it's ownPropertyPlaceholderConfigurer
that looks for properties in non-standard locations.For example, consider a custom configurer that looks in two non-standard locations (one for defaults bundled with the app, another to allow for overrides):
And a dumb configuration object that uses
@Value
:(And of course, with a /spring/defaults.properties under src/main/resources, with value1 and value2 set)
Once
<bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"/>
is added as a bean, the app fails to initialize with being unable to resolve the values forAppProperties
, as thePropertyPlaceholderConfigurer
fromRedisHttpSessionConfiguration
gets tried and dies resolving them.The text was updated successfully, but these errors were encountered: