Skip to content

Add @Order annotation to gatewayRestClientCustomizer bean#4119

Open
CheHyeonYeong wants to merge 1 commit intospring-cloud:mainfrom
CheHyeonYeong:feature/issue-3626-order-annotation
Open

Add @Order annotation to gatewayRestClientCustomizer bean#4119
CheHyeonYeong wants to merge 1 commit intospring-cloud:mainfrom
CheHyeonYeong:feature/issue-3626-order-annotation

Conversation

@CheHyeonYeong
Copy link
Copy Markdown
Contributor

@CheHyeonYeong CheHyeonYeong commented Mar 28, 2026

Summary

  • Add @Order(0) annotation to gatewayRestClientCustomizer bean
  • This allows users to define custom RestClientCustomizer beans that run after the gateway customizer and can override the requestFactory

Test plan

  • Added test to verify @Order annotation exists on the bean method
  • Added test to verify custom RestClientCustomizer can coexist with gateway customizer
  • All existing tests pass

Closes #3626

This allows users to add custom RestClientCustomizer beans that can
override the requestFactory by running after the gateway customizer.

Closes spring-cloud#3626

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: CheHyeonYeong <gusdudco6@naver.com>
}

@Test
void customRestClientCustomizerCanOverrideGatewayCustomizer() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see how this test verifies that additional RestClientCustomizer runs after the default one

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add @Order annotation to gatewayRestClientCustomizer Bean

3 participants