Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Fix for property ordering as reported in https://github.com/spring-cl… #773

Open
wants to merge 1 commit into
base: 2.2.x
Choose a base branch
from

Conversation

peteguyatt
Copy link

@peteguyatt peteguyatt commented Apr 28, 2021

…oud/spring-cloud-aws/issues/772

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

When building up the context path use the active profiles in reverse order.

E.g. with the following properties and using the prefix of context:

spring.profiles.active=profile_a,profile_b
spring.application.name: sample-app

Ensure that the context paths are in the following order:

context/sample-app_profile_b/
context/sample-app_profile_a/
context/sample-app/
context/application_profile_a
context/application_profile_b
context/application

💡 Motivation and Context

Fixed a bug introduced in 582fdc6 where properties don't seem to be able to be overridden based on the the last specified profile

This caused some confusion when running an upgraded spring boot and spring cloud project on our test servers due to properties being in a different order from previous versions

Fix #772

💚 How did you test it?

Wrote unit tests and tested locally using a snapshot version

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated reference documentation to reflect the change
  • All tests passing
  • No breaking changes

🔮 Next steps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants