-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Optimize the Appactive module #3107
Conversation
/** | ||
* @author yuluo | ||
*/ | ||
public class WebClientInterceptor extends HandlerInterceptorAdapter { |
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.
Is the interceptor interface of WebClient ExchangeFilterFunction
?
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.
sorry, I understood it into a web request, give me a little time and I finish it.
@@ -90,6 +90,10 @@ | |||
<artifactId>fastjson</artifactId> | |||
<version>2.0.11</version> | |||
</dependency> | |||
<dependency> |
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.
Do you want to add WebClient dependency? Is it spring-boot-starter-webflux
?
fix: fix the bug that the eds protocol is never observed (#3109)
/** | ||
*@author: yuluo | ||
*/ | ||
public class RestTemplateStrategyBeanPostProcessor implements BeanPostProcessor { |
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.
How to reload the class? Please check how we initialize the FeignDecoderPostProcessor
.
/** | ||
* @author yuluo | ||
*/ | ||
public class ReactiveRequestStrategyBeanPostProcessor implements BeanPostProcessor { |
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.
How to reload the class? Please check how we initialize the FeignDecoderPostProcessor. BTW, if you can add relevant web client example, it be better. Otherwise, it's hard to check whether the logic is alright.
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.
ok
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.
How to reload the class? Please check how we initialize the FeignDecoderPostProcessor. BTW, if you can add relevant web client example, it be better. Otherwise, it's hard to check whether the logic is alright.
For WebClient-example, Please See #3140
} | ||
|
||
@Bean | ||
@ConditionalOnMissingBean(name = "reactiveRequestStrategyBeanPostProcessor ") |
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.
There is a blank in the string.
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.
There is a blank in the string.
I removed the spaces in the code, please check again, thanks!
@@ -67,4 +67,16 @@ public RequestInterceptor feignRouterIdTransmissionRequestInterceptor() { | |||
return new FeignRouterIdTransmissionRequestInterceptor(); | |||
} | |||
|
|||
@Bean | |||
@ConditionalOnMissingBean(name = "restTemplateStrategyBeanPostProcessor ") |
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.
There is a blank in the string.
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.
LGTM, thanks @yuluo-yx
webClient
interceptorribbon
andfeign
interceptor names.gitignore
file in the moduleAppactiveConstants
, define static constants instead of stringsServiceMeta
incommon
toServiceMetaEntity
to distinguish theServerMeta
interface inconsumer
NacosAutoConfig
inprovider
toProviderAutoConfig