Allow building @LoadBalanced RestClient in component constructor.#1339
Conversation
|
|
||
| @Configuration(proxyBeanMethods = false) | ||
| @AutoConfiguration | ||
| static class DeferringLoadBalancerInterceptorConfig { |
There was a problem hiding this comment.
I assume these inner classes get autoconfigured because the outerclass is specified in spring.factories?
There was a problem hiding this comment.
Yes; the new annotation is just same as @Configuration(proxyBeanMethods = false)
| * @deprecated to be removed in the next release. | ||
| */ | ||
| @Deprecated(forRemoval = true) | ||
| public class LoadBalancerRestClientBuilderBeanPostProcessor implements BeanPostProcessor { |
There was a problem hiding this comment.
I was going nuts why this was deprecated and the bean removed when I initially saw this one. I was going in my head with : "is there now a new way to post-process beans? How can a @LoadBalanced be captured without a BeanPostProcessor?"
I was planning to open this defect today, but then saw you actually reverted and fixed :)
|
I'm really sorry for the mess around that deprecation @wind57. In fact, it was being load-balanced with the previous change, however, with the caveat that a component constructor would be to early to build the |
|
My point was rather different, I'm sorry for not being verbose enough. Before this PR, I saw that Yes, you did add I hope I make more sense now. And don't worry about the issue at all! |
|
The |
|
oh my, I'm an idiot, you're right! I completely missed the |
|
No worries, it's not very straightforward. |
Load balanced RestClient with deferring postprocessor.