-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Allow customization of the ProxyFactory in HttpServiceProxyFactory used to create HTTP service proxies
#36225
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
base: main
Are you sure you want to change the base?
Allow customization of the ProxyFactory in HttpServiceProxyFactory used to create HTTP service proxies
#36225
Conversation
456e119 to
c5ec8a0
Compare
HttpServiceProxyFactory customize ProxyFactory prior to proxy bean creationProxyFactory in HttpServiceProxyFactory to create HTTP service proxies
ProxyFactory in HttpServiceProxyFactory to create HTTP service proxiesProxyFactory in HttpServiceProxyFactory used to create HTTP service proxies
rstoyanchev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. The request makes sense, however I would update the implementation a bit as suggested below. Having at least one test would also be a good idea.
Please, let me know if you will make those updates.
...web/src/main/java/org/springframework/web/service/invoker/HttpServiceProxyPostProcessor.java
Outdated
Show resolved
Hide resolved
...web/src/main/java/org/springframework/web/service/invoker/HttpServiceProxyPostProcessor.java
Outdated
Show resolved
Hide resolved
c5ec8a0 to
00bec12
Compare
…actory` before creating the proxy Signed-off-by: Đặng Minh Dũng <[email protected]>
00bec12 to
b2d9da4
Compare
|
@rstoyanchev I update PR as your suggestion, could you please take a look. |
rstoyanchev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dungdm93.
The Spring Data project provides support for
RepositoryProxyPostProcessor, which allows customization of the underlyingProxyFactory(e.g, registering additional interceptors) prior to proxy bean creation.In contrast,
HttpServiceProxyFactory, which is responsible for creating client proxies from HTTP service interfaces annotated with@HttpExchange, currently does not offer a straightforward extension point for registering interceptors (e.g., for tracing or cross-cutting concerns).Example usage of
HttpServiceProxyFactory.ProxyFactoryCustomizer: