Spring-boot: PropertySourcesKey doesn't recognize a replaced property source with the same name

Created on 12 Mar 2018  路  12Comments  路  Source: spring-projects/spring-boot

Most helpful comment

@philwebb looks good.

All 12 comments

Looking at SpringConfigurationPropertySources.PropertySourceKey I'm wondering if we can't just keep a weak reference to the original property source.

forcing the SpringConfigurationPropertySources.onChange() to always fire, fixed the issue. So fixing the key should work.

Looking at the shouldTrackChanges testcase for SpringConfigurationPropertySources which seems a bit dodgy, given that it currently constructs a new SpringConfigurationPropertySources instead of verifying that the original has seen the changes.

@JoostK It does indeed, thanks for highlighting it. We'll fix that at the same time.

Thanks Phil!

@spencergibb Can you give cloud another go just to double check?

will do

@philwebb looks good.

@philwebb As mentioned in 328 I tested our project against 2.0.1.BUILD-SNAPSHOT and the issue is resolved. Thanks for fixing it!

@philwebb Hi Phil. Is there any chance of this fix getting backported into version 1.5?

@ismail-s The bug was in the new ConfigurationProprtySource code introduced in 2.0. The problem shouldn't exist in 1.5.

@philwebb Thanks for the quick response. I've created spring-cloud/spring-cloud-config#1062 instead.

Was this page helpful?
0 / 5 - 0 ratings