New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profiles added using @ActiveProfiles have different precedence #28530
Comments
This is happening due to |
Dear all,
The issue is that the test I have which was working with Spring Boot 2.5.2 does not work with 2.6.1 because the necessary profile
Log:
If modified this way it starts to work:
The given test utilizes
|
@dmak There must be something else going on in your application that you haven't shared. Here's what I see with Spring Boot 2.6.1:
If you would like us to investigate, please open a new issue and provide a complete yet minimal sample that reproduces the problem. You can share such a sample with us by zipping it up and attaching it to the issue you create or by pushing it to a separate repository on GitHub. |
I see that I was digging into a wrong place: Finally I got the following picture:
The idea behind is that I want to disable all profiles for all tests, but enable (some of) them back for certain tests. I have a feeling that now I think above is sort of this comment in issue #28739 and the dirty solution is to replace |
@dmak It's hard to tell what the issue could be without the sample. I'll try nonetheless. Could you provide more information on where the Also please create a new issue instead of using a closed one and we can continue the conversation there. |
sorry to necro this but would you happen to know how to log out this behavior? I'm having a very hard time finding it in spring |
See this example that demonstrates the issue:
The
dev
profile is activated using an EnvironmentPostProcessor.The different order demonstrated above will affect the order
application-<profile>.properties
are added and thus the value of overridden properties.The text was updated successfully, but these errors were encountered: