WillemJiang commented on a change in pull request #391: for SCB-1113 refactor 
omega spring-boot starter bean.
URL: https://github.com/apache/servicecomb-pack/pull/391#discussion_r249767603
 
 

 ##########
 File path: 
omega/omega-transport/omega-transport-feign/src/main/java/org/apache/servicecomb/pack/omega/transport/feign/FeignAutoConfiguration.java
 ##########
 @@ -29,8 +28,7 @@
 
     @Bean
     @ConditionalOnClass(RequestInterceptor.class)
-    @ConditionalOnBean(OmegaContext.class)
-    public RequestInterceptor feignClientRequestInterceptor(OmegaContext 
omegaContext){
-        return new FeignClientRequestInterceptor(omegaContext);
+    public RequestInterceptor feignClientRequestInterceptor(){
+        return new 
FeignClientRequestInterceptor(OmegaContextManager.getContext());
 
 Review comment:
   It‘s better to inject the OmegaContext instead of get from the 
OmegaContextManager.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to