-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Cannot add propertySource with profiles #27000
Comments
Note: we're not using Spring Cloud Config Note 2: Creating multiple |
I think splitting your We need the profile groups to be setup before profiles are activated, and you can only check the The only other suggestion I have is to look at the new application.yaml spring:
config:
import: dxp:common You might also want to track issue #24688 where we're trying to find a better general solution to this problem. |
Thanks for your quick answer, I'll keep #24688 in mind when upgrading in the future it indeed looks like it fits our usecase. |
Following version 2.5 update (specifically, modification of
Environment
in #24892), we cannot addpropertySource
files correctly with anEnvironmentPostProcessor
.Here is what we did previously: in a common library for several applications (mainly of
webApplicationType = REACTIVE
), anEnvironmentPostProcessor
was used to:api.port
in the example). This file also defines some profiles groups. Here is a shortened example:The class adding this behaviour looks something like this:
We now have several issues with the new Environment implementation used (
ApplicationReactiveWebEnvironment
), as profiles are not resolved beforeConfigDataEnvironmentPostProcessor
anymore:isDev()
) clause cannot resolve correctly as profiles are defined after our classIf we move the post processor after
ConfigDataEnvironmentPostProcessor
, properties group defined viaspring.profiles.group
in the file were not present yet, and the associated profiles aren't added byConfigDataEnvironmentPostProcessor
.The text was updated successfully, but these errors were encountered: