-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Customize RestTemplateBuilder #22896
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
Customize RestTemplateBuilder #22896
Conversation
49ec4c2
to
bfe3bd2
Compare
there is lots of |
@wilkinsona sorry for disturbing but I found that you mentioned at comment #22885 (comment) that CI failures are general problem. Mine PR fails at |
@bedla Sorry about the CI failures. We had some issues yesterday. |
Flagging for team attention to see what the rest of the team think about the proposal. I'm a little concerned that the immutable nature of Perhaps we need a different name for it. Another option might be have an optional @bedla out of interest, which |
Yep, that name is bit unusal as you mentioned, but I cannot imagine something more suitable. My usecase is that I wan to use all the stuff (otherwise I have to copy-paste it) from auto-configuration (see I am open to any suggestion. |
Allow customization of RestTemplateBuilder when created by RestTemplateAutoConfiguration.
bfe3bd2
to
ae2c0b1
Compare
Thanks for the PR @bedla and the follow-up. I am personally not super keen on the idea of the customizer. We discussed this at our team meeting a couple of weeks ago and I mentioned a similar pattern we use to further tune message listener container factories. I've pushed some code that mimics that pattern for One downside with this approach is that we expose an additional bean for the purpose of customization. I wish we could provide a more efficient option. Anyway, foo for thoughts @philwebb |
@snicoll no problem, I am happy to help. Anyways I have checked commit you mentioned and maybe I am missing something, but I am still unable to customize that builder, right? |
This test showcases that exact use case unless I am missing something: snicoll@0d06a84#diff-cfe5e8d68c724e41762c869df2ddaec6R241 |
ahh, I see. Thx, Ivos |
Hi,
I found that it would be handy to customize
RestTemplateBuilder
created by auto-configuration. It has some useful method that sometimes I want to call. Currently I have to use bean post processor to customize it - I think that it is ugly and error prone.What do you think about this proposal?
Thx
Ivos