1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Polish alibaba/spring-cloud-alibaba#1611 : When openfeign and dubbo coexist, DubboServiceAutoConfiguration.primaryPropertyResolver configuration causes openfeign call to fail #728

This commit is contained in:
mercyblitz 2020-08-10 16:07:44 +08:00
parent 1a368ee6f8
commit 098919807b

View File

@ -24,15 +24,11 @@ import com.alibaba.cloud.dubbo.service.parameter.RequestBodyServiceParameterReso
import com.alibaba.cloud.dubbo.service.parameter.RequestHeaderServiceParameterResolver;
import com.alibaba.cloud.dubbo.service.parameter.RequestParamServiceParameterResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertyResolver;
/**
* Spring Boot Auto-Configuration class for Dubbo Service.
@ -49,17 +45,6 @@ public class DubboServiceAutoConfiguration {
return new DubboGenericServiceFactory();
}
/**
* Build a primary {@link PropertyResolver} bean to {@link Autowired @Autowired}.
* @param environment {@link Environment}
* @return alias bean for {@link Environment}
*/
@Bean
@Primary
public PropertyResolver primaryPropertyResolver(Environment environment) {
return environment;
}
@Configuration(proxyBeanMethods = false)
@Import({ DubboGenericServiceExecutionContextFactory.class,
RequestParamServiceParameterResolver.class,