some compatibility modifications about Hoxton

pull/929/head
fangjian0423 5 years ago
parent 08cce947fd
commit 75f02aa2c5

@ -7,7 +7,7 @@ import org.apache.dubbo.config.annotation.Reference;
*/ */
public class FooServiceConsumer { public class FooServiceConsumer {
@Reference(version = "${foo.service.version}", application = "${dubbo.application.id}", url = "dubbo://localhost:12345", timeout = 30000) @Reference(version = "${foo.service.version}", application = "${dubbo.application.id}", url = "dubbo://localhost:12345?version=1.0.0", timeout = 30000)
private FooService fooService; private FooService fooService;
public String hello(String name) { public String hello(String name) {

@ -31,7 +31,6 @@ import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.core.type.MethodMetadata; import org.springframework.core.type.MethodMetadata;
import org.springframework.core.type.StandardMethodMetadata; import org.springframework.core.type.StandardMethodMetadata;
import org.springframework.core.type.classreading.MethodMetadataReadingVisitor;
import org.springframework.http.HttpRequest; import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.ClientHttpResponse;
@ -171,12 +170,6 @@ public class SentinelBeanPostProcessor implements MergedBeanDefinitionPostProces
&& checkMethodMetadataReadingVisitor(beanDefinition); && checkMethodMetadataReadingVisitor(beanDefinition);
} }
// private boolean checkStandardMethodMetadata(RootBeanDefinition beanDefinition) {
// return beanDefinition.getSource() instanceof StandardMethodMetadata
// && ((StandardMethodMetadata) beanDefinition.getSource())
// .isAnnotated(SentinelRestTemplate.class.getName());
// }
private boolean checkMethodMetadataReadingVisitor(RootBeanDefinition beanDefinition) { private boolean checkMethodMetadataReadingVisitor(RootBeanDefinition beanDefinition) {
return beanDefinition.getSource() instanceof MethodMetadata return beanDefinition.getSource() instanceof MethodMetadata
&& ((MethodMetadata) beanDefinition.getSource()) && ((MethodMetadata) beanDefinition.getSource())

Loading…
Cancel
Save