Spring Boot: 4.0.5
Spring Cloud: 2025.1.1
Related issue: spring-projects/spring-boot#50181
Describe the bug
When using configtree: for properties and using ContextRefresher#refreshEnvironment(), all properties from configtree property sources will be returned as changed, even if the actual value did not.
The reason is that ContextRefresher#changes(Map, Map) checks for equality, but the returned PropertyFileContent does not implement equals/hashCode.
After posting the issue in the Spring Boot repo, the response was that this should be raised here.
Sample
Example project: https://github.com/schosin/spring-cloud-commons-1687
A Spring Boot application with spring-cloud-context using this configuration, and the directory containing atleast one file will trigger the issue with the auto configured ContextRefresher.
spring:
config:
import:
- configtree:some/path/to/directory/
Spring Boot: 4.0.5
Spring Cloud: 2025.1.1
Related issue: spring-projects/spring-boot#50181
Describe the bug
When using configtree: for properties and using ContextRefresher#refreshEnvironment(), all properties from configtree property sources will be returned as changed, even if the actual value did not.
The reason is that ContextRefresher#changes(Map, Map) checks for equality, but the returned PropertyFileContent does not implement equals/hashCode.
After posting the issue in the Spring Boot repo, the response was that this should be raised here.
Sample
Example project: https://github.com/schosin/spring-cloud-commons-1687
A Spring Boot application with spring-cloud-context using this configuration, and the directory containing atleast one file will trigger the issue with the auto configured ContextRefresher.