Hi, I have a service registry on which a microservice (spring-boot module) is running. Client app takes the centralized application.yml from registry and refreshes itself upon the call to appURL/refresh. If I change a value of the centralized configuration file and post to client app /refresh it dynamically updates the properties inside the @ConfigurationProperty annotated class. Which is all cool. I can see the changes immedately on the client module. It is working with any of the sole properties and working with collection element update and collection element add (so I can add or change any of the emails in my property app.employee.emails and after /refresh I can see the change). However it is not the case with remove: removing elements is not reflected in client app after calling /refresh end point. Thank you.

Comment From: dsyer

I don't know if there's anything we can do about dynamically removing (without some clunky syntax in the property values or something). I'd be happy to look at a pull request if anyone thinks it can be done simply.

Comment From: nicolaferraro

I've hit the same problem. The issue is the removal of an existing property: properties can be changed, added but not removed. When trying to remove a property, the shadow remains in the spring configuration.

Yaml arrays like:

array:
 - a
 - b
 - c

are converted to properties:

array[0]=a
array[1]=b
array[2]=c

Removing the third element from the array is the same as removing the property with key "array[2]".

But property removal is not supported now and arrays can only increase their size.

I think the refresh mechanism should be fixed. This is more a bug than a possible enhancement.

Comment From: marcingrzejszczak

Is it still a problem with Finchley.RELEASE?

Comment From: spencergibb

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: pbharathi11

When restart_context strategy is used, will all beans get reloaded irrespective of whether they are annotated with @ConfigurationProperties / @RefreshScope or not? Also wanted to confirm if refresh strategy is used, will it refresh configuration beans annotated with @ConfigurationProperties / @RefreshScope only?