Skip to content

Quick fix for LoadBalancer and Feign client configuration - #1803

Merged
BoykoAlex merged 7 commits into
mainfrom
gh-1802
Feb 25, 2026
Merged

BoykoAlex merged 7 commits into
mainfrom
gh-1802

Conversation

@BoykoAlex

Copy link
Copy Markdown
Contributor

Fixes #1802

@martinlippert

Copy link
Copy Markdown
Member

Tried the branch, here are some observations:

@FeignClient(name = "something") is turned into @FeignClient(configuration = com.example.demo.FeignConfigExample.class, name = "something")

I would prefer:

  • to not have a fully qualified class name appearing in the annotation, but adding an import statement as well
  • add the attribute to the end of the already existing list of attributes (in case there are already attributes)

Adding the class to an existing configuration attribute works nicely.

Everything else looks awesome!

@BoykoAlex

BoykoAlex commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor Author

There is an OR recipe for adding an attribute to an annotation so i thought it'd be a quick win and would be the starting point as well for turning this into the JDT refactoring... Seems that rewrite sorts attributes in alphabetic order... it sucks that it puts an FQN though... I could have sworn that i saw code in the recipe using simple names rather than FQNs - I'll investigate, hopefully I just misuse the recipe...
I also spotted a bit of a regression when deserializing a recipe without JsonCreator constructor and this PR would fix that...

@BoykoAlex

Copy link
Copy Markdown
Contributor Author

FQN should be fixed with this: openrewrite/rewrite#6786

@BoykoAlex
BoykoAlex merged commit 4b43952 into main Feb 25, 2026
7 checks passed
@BoykoAlex
BoykoAlex deleted the gh-1802 branch February 25, 2026 05:22
@martinlippert martinlippert added this to the 5.1.0.RELEASE milestone Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quick fix to add class to client configs

2 participants