Describe the bug Please provide details of the problem, including the version of Spring Cloud that you are using.
https://github.com/spring-cloud/spring-cloud-config/blob/master/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/EnvironmentController.java#L306
Because of the TreeMap used here, if someone requests a yml file as is by specifying {application}-{profile}.yml format (where the yml file is hosted in git), we get a sorted output of the yml, which is sometimes not desired by the application consuming it if it is enforcing a strict order.
Sample If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.
Comment From: spencergibb
57bcd734d11007b250f4c4aa0b0332f709bd2d13 changed it from a LinkedHashMap
to a TreeMap
.
Comment From: spencergibb
It was likely changed to ease testing.
Comment From: akp77
@spencergibb Any way to get around this until the fix is rolled out ?
Comment From: spencergibb
no, it's been this way for years
Comment From: akp77
Thanks for the quick turn around!
Comment From: spencergibb
It helped that your pointed directly to the line of code where the problem was 😁