-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Expose Spring Integration global properties #25377
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
Expose Spring Integration global properties #25377
Conversation
@artembilan thanks for the PR but I am not sure I understood the migration path for users. Let's say they specify this file in their application with some customization. From a quick look at the code, given that they are defaults in the |
Thanks, @snicoll , for heads up! You are right: we definitely need to explain a migration path for end-users. Here is how it works right now:
The idea with this fix is to let end-users to migrate from custom So, let me play with something like "ConditionalOnMissingResource" to let the target application to stay stable after upgrading to Spring Boot Thank you again for spotting the flaw in my PR! |
We discussed this one at the team meeting and we felt that making things a little bit more explicit would be better to let users debug where things are coming from. One thing that doesn't feel right is that one ways is winning over the other while we could do this on a property per property basis. Our idea was to change this so that
@artembilan Would you have the time to update your PR in that direction? |
Thanks, @snicoll , for feedback! Even if my preference would be do not encourage end-users to use So, yeah, I will add respective |
This has my preference as well and the reason why we're trying to build some sort of middle ground solutions here. I would add this file with lowest precedence then, to encourage the use of the regular |
Please, see an update in the PR about an Thanks |
Spring Integration comes with some global properties which can be configured via `META-INF/spring.integration.properties`. The framework then provides an `integrationGlobalProperties` bean as an `org.springframework.integration.context.IntegrationProperties` instance * Expose those properties via an `org.springframework.boot.autoconfigure.integration.IntegrationProperties` for end-user convenience to have everything in a single `application.properties` * Map respective `org.springframework.boot.autoconfigure.integration.IntegrationProperties` props into an `org.springframework.integration.context.IntegrationProperties` and expose the last one as an `integrationGlobalProperties` bean for further Spring Integration framework considerations
missing `META-INF/spring.integration.properties`. Otherwise end-user existing environment wins to properly mitigate a migration pass
…ring.integration.properties` file and register it as an origin resource for mapped `IntegrationProperties` from it and as the last one letting the properties from a general Spring Boot environment to win
16a17a5
to
280429f
Compare
Hi there! Is there anything I need to do for this PR? Thank you! |
I am not sure. We haven't got the chance to review the updated PR. Thanks for the follow-up. |
Spring Integration comes with some global properties which can be configured via `META-INF/spring.integration.properties`. The framework then provides an `integrationGlobalProperties` bean as an `org.springframework.integration.context.IntegrationProperties` instance. This commit allows users to configure these using regular `application.properties`. If a `META-INF/spring.integration.properties` file exists, the values are used as fallback. See gh-25377
Spring Integration comes with some global properties
which can be configured via
META-INF/spring.integration.properties
.The framework then provides an
integrationGlobalProperties
bean as anorg.springframework.integration.context.IntegrationProperties
instanceorg.springframework.boot.autoconfigure.integration.IntegrationProperties
for end-user convenience to have everything in a single
application.properties
org.springframework.boot.autoconfigure.integration.IntegrationProperties
props into an
org.springframework.integration.context.IntegrationProperties
andexpose the last one as an
integrationGlobalProperties
bean for furtherSpring Integration framework considerations