1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00
This commit is contained in:
fangjian0423
2019-08-14 15:24:08 +08:00
parent 7ce2f7a27e
commit c747d1f5e6
120 changed files with 1318 additions and 1430 deletions

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,7 +26,6 @@ import java.lang.annotation.Target;
import org.apache.dubbo.config.annotation.Reference; import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.rpc.ExporterListener; import org.apache.dubbo.rpc.ExporterListener;
import org.apache.dubbo.rpc.Filter; import org.apache.dubbo.rpc.Filter;
import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -136,7 +135,7 @@ public class DubboLoadBalancedRestTemplateAutoConfiguration
* {@link DubboTransported @DubboTransported} * {@link DubboTransported @DubboTransported}
* *
* @param beanName the bean name of {@link LoadBalanced @LoadBalanced} * @param beanName the bean name of {@link LoadBalanced @LoadBalanced}
* {@link RestTemplate} * {@link RestTemplate}
* @param attributesResolver {@link DubboTransportedAttributesResolver} * @param attributesResolver {@link DubboTransportedAttributesResolver}
* @return non-null {@link Map} * @return non-null {@link Map}
*/ */
@@ -162,8 +161,8 @@ public class DubboLoadBalancedRestTemplateAutoConfiguration
* *
* @param restTemplate {@link LoadBalanced @LoadBalanced} {@link RestTemplate} Bean * @param restTemplate {@link LoadBalanced @LoadBalanced} {@link RestTemplate} Bean
* @param dubboTranslatedAttributes the annotation dubboTranslatedAttributes * @param dubboTranslatedAttributes the annotation dubboTranslatedAttributes
* {@link RestTemplate} bean being annotated * {@link RestTemplate} bean being annotated
* {@link DubboTransported @DubboTransported} * {@link DubboTransported @DubboTransported}
*/ */
private void adaptRestTemplate(RestTemplate restTemplate, private void adaptRestTemplate(RestTemplate restTemplate,
Map<String, Object> dubboTranslatedAttributes) { Map<String, Object> dubboTranslatedAttributes) {

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +21,6 @@ import java.util.function.Supplier;
import org.apache.dubbo.config.ProtocolConfig; import org.apache.dubbo.config.ProtocolConfig;
import org.apache.dubbo.config.spring.ServiceBean; import org.apache.dubbo.config.spring.ServiceBean;
import org.apache.dubbo.config.spring.context.event.ServiceBeanExportedEvent; import org.apache.dubbo.config.spring.context.event.ServiceBeanExportedEvent;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -41,10 +40,8 @@ import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.TreeCache; import org.apache.curator.framework.recipes.cache.TreeCache;
import org.apache.curator.framework.recipes.cache.TreeCacheEvent; import org.apache.curator.framework.recipes.cache.TreeCacheEvent;
import org.apache.curator.framework.recipes.cache.TreeCacheListener; import org.apache.curator.framework.recipes.cache.TreeCacheListener;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.registry.NotifyListener; import org.apache.dubbo.registry.NotifyListener;
import org.apache.zookeeper.Watcher; import org.apache.zookeeper.Watcher;
import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
@@ -84,6 +81,7 @@ import com.alibaba.cloud.nacos.discovery.NacosWatch;
import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.NamingService;
import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.listener.NamingEvent;
import com.netflix.discovery.CacheRefreshedEvent; import com.netflix.discovery.CacheRefreshedEvent;
import com.netflix.discovery.shared.Applications; import com.netflix.discovery.shared.Applications;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,7 +27,6 @@ import java.util.Map;
import org.apache.dubbo.config.RegistryConfig; import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.ServiceBean; import org.apache.dubbo.config.spring.ServiceBean;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -57,6 +55,7 @@ import com.alibaba.cloud.dubbo.autoconfigure.condition.MissingSpringCloudRegistr
import com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository; import com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository;
import com.alibaba.cloud.dubbo.registry.DubboServiceRegistrationEventPublishingAspect; import com.alibaba.cloud.dubbo.registry.DubboServiceRegistrationEventPublishingAspect;
import com.alibaba.cloud.dubbo.registry.event.ServiceInstancePreRegisteredEvent; import com.alibaba.cloud.dubbo.registry.event.ServiceInstancePreRegisteredEvent;
import com.ecwid.consul.v1.agent.model.NewService; import com.ecwid.consul.v1.agent.model.NewService;
import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,7 +22,6 @@ import java.util.List;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.config.spring.ServiceBean; import org.apache.dubbo.config.spring.ServiceBean;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
@@ -45,6 +43,7 @@ import org.springframework.context.event.EventListener;
import com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository; import com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository;
import com.alibaba.cloud.dubbo.registry.event.ServiceInstancePreRegisteredEvent; import com.alibaba.cloud.dubbo.registry.event.ServiceInstancePreRegisteredEvent;
import com.ecwid.consul.v1.agent.model.NewService; import com.ecwid.consul.v1.agent.model.NewService;
/** /**

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,7 +19,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import org.apache.dubbo.rpc.service.GenericException; import org.apache.dubbo.rpc.service.GenericException;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.ClientHttpResponse;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,7 +19,6 @@ import java.io.IOException;
import java.util.List; import java.util.List;
import org.apache.dubbo.rpc.service.GenericException; import org.apache.dubbo.rpc.service.GenericException;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +24,6 @@ import java.util.Map;
import org.apache.dubbo.rpc.service.GenericException; import org.apache.dubbo.rpc.service.GenericException;
import org.apache.dubbo.rpc.service.GenericService; import org.apache.dubbo.rpc.service.GenericService;
import org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor; import org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor;
import org.springframework.http.HttpRequest; import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestExecution;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,7 +19,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import org.apache.dubbo.common.io.UnsafeByteArrayInputStream; import org.apache.dubbo.common.io.UnsafeByteArrayInputStream;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpInputMessage;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,7 +41,7 @@ public class HttpRequestConsumersMatcher extends AbstractHttpRequestMatcher {
* Creates a new instance from 0 or more "consumes" expressions. * Creates a new instance from 0 or more "consumes" expressions.
* *
* @param consumes consumes expressions if 0 expressions are provided, the condition * @param consumes consumes expressions if 0 expressions are provided, the condition
* will match to every request * will match to every request
*/ */
public HttpRequestConsumersMatcher(String... consumes) { public HttpRequestConsumersMatcher(String... consumes) {
this(consumes, null); this(consumes, null);

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -34,10 +33,10 @@ public class HttpRequestParamsMatcher extends AbstractHttpRequestMatcher {
/** /**
* @param params The pattern of params : * @param params The pattern of params :
* <ul> * <ul>
* <li>name=value</li> * <li>name=value</li>
* <li>name</li> * <li>name</li>
* </ul> * </ul>
*/ */
public HttpRequestParamsMatcher(String... params) { public HttpRequestParamsMatcher(String... params) {
this.expressions = parseExpressions(params); this.expressions = parseExpressions(params);

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,7 +23,6 @@ import java.util.Iterator;
import java.util.function.Supplier; import java.util.function.Supplier;
import org.apache.dubbo.config.ProtocolConfig; import org.apache.dubbo.config.ProtocolConfig;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
/** /**

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -29,7 +28,6 @@ import java.util.stream.Stream;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.config.spring.ServiceBean; import org.apache.dubbo.config.spring.ServiceBean;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,7 +22,6 @@ import java.lang.reflect.Method;
import java.util.Map; import java.util.Map;
import org.apache.dubbo.rpc.service.GenericService; import org.apache.dubbo.rpc.service.GenericService;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import com.alibaba.cloud.dubbo.metadata.RestMethodMetadata; import com.alibaba.cloud.dubbo.metadata.RestMethodMetadata;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +24,6 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.apache.dubbo.rpc.service.GenericService; import org.apache.dubbo.rpc.service.GenericService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FeignContext; import org.springframework.cloud.openfeign.FeignContext;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,7 +17,6 @@ package com.alibaba.cloud.dubbo.registry;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.registry.RegistryFactory; import org.apache.dubbo.registry.RegistryFactory;
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,7 +20,6 @@ import static java.lang.System.getProperty;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.registry.Registry; import org.apache.dubbo.registry.Registry;
import org.apache.dubbo.registry.RegistryFactory; import org.apache.dubbo.registry.RegistryFactory;
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -36,7 +35,6 @@ import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.config.RegistryConfig; import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.ReferenceBean; import org.apache.dubbo.config.spring.ReferenceBean;
import org.apache.dubbo.rpc.service.GenericService; import org.apache.dubbo.rpc.service.GenericService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.MutablePropertyValues;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +24,6 @@ import org.apache.dubbo.common.URL;
import org.apache.dubbo.config.ApplicationConfig; import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ProtocolConfig; import org.apache.dubbo.config.ProtocolConfig;
import org.apache.dubbo.config.ServiceConfig; import org.apache.dubbo.config.ServiceConfig;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,7 +20,6 @@ import java.lang.reflect.Method;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.apache.dubbo.rpc.service.GenericService; import org.apache.dubbo.rpc.service.GenericService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -52,10 +51,10 @@ public class DubboMetadataServiceProxy implements BeanClassLoaderAware, Disposab
name -> newProxy(name, version)); name -> newProxy(name, version));
} }
/** /**
* Remove {@link DubboMetadataService}'s Proxy by service name * Remove {@link DubboMetadataService}'s Proxy by service name
* @param serviceName the service name * @param serviceName the service name
*/ */
public void removeProxy(String serviceName) { public void removeProxy(String serviceName) {
dubboMetadataServiceCache.remove(serviceName); dubboMetadataServiceCache.remove(serviceName);
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,7 +25,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,7 +16,6 @@
package com.alibaba.cloud.dubbo.service.parameter; package com.alibaba.cloud.dubbo.service.parameter;
import org.apache.dubbo.rpc.service.GenericService; import org.apache.dubbo.rpc.service.GenericService;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import com.alibaba.cloud.dubbo.http.HttpServerRequest; import com.alibaba.cloud.dubbo.http.HttpServerRequest;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +24,6 @@ import java.util.stream.Collectors;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,14 +15,14 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import java.lang.reflect.Constructor;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.core.ResolvableType; import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import java.lang.reflect.Constructor;
/** /**
* {@link AbstractMediaTypeExpression} Test * {@link AbstractMediaTypeExpression} Test
* *
@@ -31,41 +30,45 @@ import java.lang.reflect.Constructor;
*/ */
public abstract class AbstractMediaTypeExpressionTest<T extends AbstractMediaTypeExpression> { public abstract class AbstractMediaTypeExpressionTest<T extends AbstractMediaTypeExpression> {
protected T createExpression(String expression) { protected T createExpression(String expression) {
ResolvableType resolvableType = ResolvableType.forType(getClass().getGenericSuperclass()); ResolvableType resolvableType = ResolvableType
Class<T> firstGenericType = (Class<T>) resolvableType.resolveGeneric(0); .forType(getClass().getGenericSuperclass());
Constructor<T> constructor = null; Class<T> firstGenericType = (Class<T>) resolvableType.resolveGeneric(0);
try { Constructor<T> constructor = null;
constructor = firstGenericType.getDeclaredConstructor(String.class); try {
} catch (NoSuchMethodException e) { constructor = firstGenericType.getDeclaredConstructor(String.class);
throw new RuntimeException(e); }
} catch (NoSuchMethodException e) {
return BeanUtils.instantiateClass(constructor, expression); throw new RuntimeException(e);
} }
return BeanUtils.instantiateClass(constructor, expression);
}
@Test @Test
public void testGetMediaTypeAndNegated() { public void testGetMediaTypeAndNegated() {
// Normal // Normal
AbstractMediaTypeExpression expression = createExpression(MediaType.APPLICATION_JSON_VALUE); AbstractMediaTypeExpression expression = createExpression(
Assert.assertEquals(MediaType.APPLICATION_JSON, expression.getMediaType()); MediaType.APPLICATION_JSON_VALUE);
Assert.assertFalse(expression.isNegated()); Assert.assertEquals(MediaType.APPLICATION_JSON, expression.getMediaType());
Assert.assertFalse(expression.isNegated());
// Negated // Negated
expression = createExpression("!" + MediaType.APPLICATION_JSON_VALUE); expression = createExpression("!" + MediaType.APPLICATION_JSON_VALUE);
Assert.assertEquals(MediaType.APPLICATION_JSON, expression.getMediaType()); Assert.assertEquals(MediaType.APPLICATION_JSON, expression.getMediaType());
Assert.assertTrue(expression.isNegated()); Assert.assertTrue(expression.isNegated());
} }
@Test @Test
public void testEqualsAndHashCode() { public void testEqualsAndHashCode() {
Assert.assertEquals(createExpression(MediaType.APPLICATION_JSON_VALUE), createExpression(MediaType.APPLICATION_JSON_VALUE)); Assert.assertEquals(createExpression(MediaType.APPLICATION_JSON_VALUE),
Assert.assertEquals(createExpression(MediaType.APPLICATION_JSON_VALUE).hashCode(), createExpression(MediaType.APPLICATION_JSON_VALUE));
createExpression(MediaType.APPLICATION_JSON_VALUE).hashCode()); Assert.assertEquals(createExpression(MediaType.APPLICATION_JSON_VALUE).hashCode(),
} createExpression(MediaType.APPLICATION_JSON_VALUE).hashCode());
}
@Test @Test
public void testCompareTo() { public void testCompareTo() {
Assert.assertEquals(0, Assert.assertEquals(0, createExpression(MediaType.APPLICATION_JSON_VALUE)
createExpression(MediaType.APPLICATION_JSON_VALUE).compareTo(createExpression(MediaType.APPLICATION_JSON_VALUE))); .compareTo(createExpression(MediaType.APPLICATION_JSON_VALUE)));
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,13 +15,13 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import java.lang.reflect.Constructor;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.core.ResolvableType; import org.springframework.core.ResolvableType;
import java.lang.reflect.Constructor;
/** /**
* {@link AbstractNameValueExpression} Test * {@link AbstractNameValueExpression} Test
* *
@@ -30,48 +29,53 @@ import java.lang.reflect.Constructor;
*/ */
public abstract class AbstractNameValueExpressionTest<T extends AbstractNameValueExpression> { public abstract class AbstractNameValueExpressionTest<T extends AbstractNameValueExpression> {
protected T createExpression(String expression) { protected T createExpression(String expression) {
ResolvableType resolvableType = ResolvableType.forType(getClass().getGenericSuperclass()); ResolvableType resolvableType = ResolvableType
Class<T> firstGenericType = (Class<T>) resolvableType.resolveGeneric(0); .forType(getClass().getGenericSuperclass());
Constructor<T> constructor = null; Class<T> firstGenericType = (Class<T>) resolvableType.resolveGeneric(0);
try { Constructor<T> constructor = null;
constructor = firstGenericType.getDeclaredConstructor(String.class); try {
} catch (NoSuchMethodException e) { constructor = firstGenericType.getDeclaredConstructor(String.class);
throw new RuntimeException(e); }
} catch (NoSuchMethodException e) {
return BeanUtils.instantiateClass(constructor, expression); throw new RuntimeException(e);
} }
return BeanUtils.instantiateClass(constructor, expression);
}
@Test @Test
public void testGetNameAndValue() { public void testGetNameAndValue() {
// Normal Name and value // Normal Name and value
AbstractNameValueExpression expression = createExpression("a=1"); AbstractNameValueExpression expression = createExpression("a=1");
Assert.assertEquals("a", expression.getName()); Assert.assertEquals("a", expression.getName());
Assert.assertFalse(expression.isNegated()); Assert.assertFalse(expression.isNegated());
expression = createExpression("a=1"); expression = createExpression("a=1");
Assert.assertEquals("a", expression.getName()); Assert.assertEquals("a", expression.getName());
Assert.assertEquals("1", expression.getValue()); Assert.assertEquals("1", expression.getValue());
Assert.assertFalse(expression.isNegated()); Assert.assertFalse(expression.isNegated());
// Negated Name // Negated Name
expression = createExpression("!a"); expression = createExpression("!a");
Assert.assertEquals("a", expression.getName()); Assert.assertEquals("a", expression.getName());
Assert.assertTrue(expression.isNegated()); Assert.assertTrue(expression.isNegated());
expression = createExpression("a!=1"); expression = createExpression("a!=1");
Assert.assertEquals("a", expression.getName()); Assert.assertEquals("a", expression.getName());
Assert.assertEquals("1", expression.getValue()); Assert.assertEquals("1", expression.getValue());
Assert.assertTrue(expression.isNegated()); Assert.assertTrue(expression.isNegated());
} }
@Test @Test
public void testEqualsAndHashCode() { public void testEqualsAndHashCode() {
Assert.assertEquals(createExpression("a"), createExpression("a")); Assert.assertEquals(createExpression("a"), createExpression("a"));
Assert.assertEquals(createExpression("a").hashCode(), createExpression("a").hashCode()); Assert.assertEquals(createExpression("a").hashCode(),
Assert.assertEquals(createExpression("a=1"), createExpression("a = 1 ")); createExpression("a").hashCode());
Assert.assertEquals(createExpression("a=1").hashCode(), createExpression("a = 1 ").hashCode()); Assert.assertEquals(createExpression("a=1"), createExpression("a = 1 "));
Assert.assertNotEquals(createExpression("a"), createExpression("b")); Assert.assertEquals(createExpression("a=1").hashCode(),
Assert.assertNotEquals(createExpression("a").hashCode(), createExpression("b").hashCode()); createExpression("a = 1 ").hashCode());
} Assert.assertNotEquals(createExpression("a"), createExpression("b"));
Assert.assertNotEquals(createExpression("a").hashCode(),
createExpression("b").hashCode());
}
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,21 +24,22 @@ import org.springframework.http.MediaType;
* *
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
*/ */
public class ConsumeMediaTypeExpressionTest extends AbstractMediaTypeExpressionTest<ConsumeMediaTypeExpression> { public class ConsumeMediaTypeExpressionTest
extends AbstractMediaTypeExpressionTest<ConsumeMediaTypeExpression> {
@Test @Test
public void testMatch() { public void testMatch() {
ConsumeMediaTypeExpression expression = createExpression(MediaType.ALL_VALUE); ConsumeMediaTypeExpression expression = createExpression(MediaType.ALL_VALUE);
Assert.assertTrue(expression.match(MediaType.APPLICATION_JSON_UTF8)); Assert.assertTrue(expression.match(MediaType.APPLICATION_JSON_UTF8));
expression = createExpression(MediaType.APPLICATION_JSON_VALUE); expression = createExpression(MediaType.APPLICATION_JSON_VALUE);
Assert.assertTrue(expression.match(MediaType.APPLICATION_JSON_UTF8)); Assert.assertTrue(expression.match(MediaType.APPLICATION_JSON_UTF8));
expression = createExpression(MediaType.APPLICATION_JSON_VALUE + ";q=0.7"); expression = createExpression(MediaType.APPLICATION_JSON_VALUE + ";q=0.7");
Assert.assertTrue(expression.match(MediaType.APPLICATION_JSON_UTF8)); Assert.assertTrue(expression.match(MediaType.APPLICATION_JSON_UTF8));
expression = createExpression(MediaType.TEXT_HTML_VALUE); expression = createExpression(MediaType.TEXT_HTML_VALUE);
Assert.assertFalse(expression.match(MediaType.APPLICATION_JSON_UTF8)); Assert.assertFalse(expression.match(MediaType.APPLICATION_JSON_UTF8));
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,45 +15,46 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import static com.alibaba.cloud.dubbo.http.DefaultHttpRequest.builder;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.HttpRequest; import org.springframework.http.HttpRequest;
import static com.alibaba.cloud.dubbo.http.DefaultHttpRequest.builder;
/** /**
* {@link HeaderExpression} Test * {@link HeaderExpression} Test
* *
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
*/ */
public class HeaderExpressionTest extends AbstractNameValueExpressionTest<HeaderExpression> { public class HeaderExpressionTest
extends AbstractNameValueExpressionTest<HeaderExpression> {
@Test @Test
public void testIsCaseSensitiveName() { public void testIsCaseSensitiveName() {
Assert.assertFalse(createExpression("a=1").isCaseSensitiveName()); Assert.assertFalse(createExpression("a=1").isCaseSensitiveName());
Assert.assertFalse(createExpression("a=!1").isCaseSensitiveName()); Assert.assertFalse(createExpression("a=!1").isCaseSensitiveName());
Assert.assertFalse(createExpression("b=1").isCaseSensitiveName()); Assert.assertFalse(createExpression("b=1").isCaseSensitiveName());
} }
@Test @Test
public void testMatch() { public void testMatch() {
HeaderExpression expression = createExpression("a=1"); HeaderExpression expression = createExpression("a=1");
HttpRequest request = builder().build(); HttpRequest request = builder().build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().header("a", "").build(); request = builder().header("a", "").build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().header("a", "2").build(); request = builder().header("a", "2").build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().header("", "1").build(); request = builder().header("", "1").build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().header("a", "1").build(); request = builder().header("a", "1").build();
Assert.assertTrue(expression.match(request)); Assert.assertTrue(expression.match(request));
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,34 +15,37 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import org.junit.Assert;
import org.springframework.http.HttpMethod;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import org.junit.Assert;
import org.springframework.http.HttpMethod;
/** /**
* {@link HttpRequestMethodsMatcher} Test * {@link HttpRequestMethodsMatcher} Test
* *
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
*/ */
public class HttpRequestMethodsMatcherTest extends AbstractHttpRequestMatcherTest<HttpRequestMethodsMatcher> { public class HttpRequestMethodsMatcherTest
extends AbstractHttpRequestMatcherTest<HttpRequestMethodsMatcher> {
HttpRequestMethodsMatcher matcher = new HttpRequestMethodsMatcher("GET"); HttpRequestMethodsMatcher matcher = new HttpRequestMethodsMatcher("GET");
@Override @Override
public void testEqualsAndHashCode() { public void testEqualsAndHashCode() {
Assert.assertEquals(new HashSet<>(Arrays.asList(HttpMethod.GET)), matcher.getMethods()); Assert.assertEquals(new HashSet<>(Arrays.asList(HttpMethod.GET)),
} matcher.getMethods());
}
@Override @Override
public void testGetContent() { public void testGetContent() {
Assert.assertEquals(new HashSet<>(Arrays.asList(HttpMethod.GET)), matcher.getContent()); Assert.assertEquals(new HashSet<>(Arrays.asList(HttpMethod.GET)),
} matcher.getContent());
}
@Override @Override
public void testGetToStringInfix() { public void testGetToStringInfix() {
Assert.assertEquals(" || ", matcher.getToStringInfix()); Assert.assertEquals(" || ", matcher.getToStringInfix());
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,12 +15,12 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import java.net.URI;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import java.net.URI;
/** /**
* {@link HttpRequestParamsMatcher} Test * {@link HttpRequestParamsMatcher} Test
* *
@@ -29,68 +28,68 @@ import java.net.URI;
*/ */
public class HttpRequestParamsMatcherTest { public class HttpRequestParamsMatcherTest {
// @Test // @Test
// public void testGetParams() { // public void testGetParams() {
// //
// HttpRequestParamsMatcher matcher = new HttpRequestParamsMatcher( // HttpRequestParamsMatcher matcher = new HttpRequestParamsMatcher(
// "a ", // "a ",
// "a =1", // "a =1",
// "b = 2", // "b = 2",
// "b = 3 ", // "b = 3 ",
// " c = 4 ", // " c = 4 ",
// " d" // " d"
// ); // );
// //
// Map<String, List<String>> params = matcher.getParams(); // Map<String, List<String>> params = matcher.getParams();
// Assert.assertEquals(4, params.size()); // Assert.assertEquals(4, params.size());
// Assert.assertTrue(params.containsKey("a")); // Assert.assertTrue(params.containsKey("a"));
// Assert.assertTrue(params.containsKey("b")); // Assert.assertTrue(params.containsKey("b"));
// Assert.assertTrue(params.containsKey("c")); // Assert.assertTrue(params.containsKey("c"));
// Assert.assertTrue(params.containsKey("d")); // Assert.assertTrue(params.containsKey("d"));
// Assert.assertFalse(params.containsKey("e")); // Assert.assertFalse(params.containsKey("e"));
// //
// List<String> values = params.get("a"); // List<String> values = params.get("a");
// Assert.assertEquals(2, values.size()); // Assert.assertEquals(2, values.size());
// Assert.assertEquals("", values.get(0)); // Assert.assertEquals("", values.get(0));
// Assert.assertEquals("1", values.get(1)); // Assert.assertEquals("1", values.get(1));
// //
// values = params.get("b"); // values = params.get("b");
// Assert.assertEquals(2, values.size()); // Assert.assertEquals(2, values.size());
// Assert.assertEquals("2", values.get(0)); // Assert.assertEquals("2", values.get(0));
// Assert.assertEquals("3", values.get(1)); // Assert.assertEquals("3", values.get(1));
// //
// values = params.get("c"); // values = params.get("c");
// Assert.assertEquals(1, values.size()); // Assert.assertEquals(1, values.size());
// Assert.assertEquals("4", values.get(0)); // Assert.assertEquals("4", values.get(0));
// //
// values = params.get("d"); // values = params.get("d");
// Assert.assertEquals(1, values.size()); // Assert.assertEquals(1, values.size());
// Assert.assertEquals("", values.get(0)); // Assert.assertEquals("", values.get(0));
// } // }
@Test @Test
public void testEquals() { public void testEquals() {
HttpRequestParamsMatcher matcher = new HttpRequestParamsMatcher("a ", "a = 1"); HttpRequestParamsMatcher matcher = new HttpRequestParamsMatcher("a ", "a = 1");
MockClientHttpRequest request = new MockClientHttpRequest(); MockClientHttpRequest request = new MockClientHttpRequest();
request.setURI(URI.create("http://dummy/?a")); request.setURI(URI.create("http://dummy/?a"));
Assert.assertTrue(matcher.match(request)); Assert.assertTrue(matcher.match(request));
request.setURI(URI.create("http://dummy/?a&a=1")); request.setURI(URI.create("http://dummy/?a&a=1"));
Assert.assertTrue(matcher.match(request)); Assert.assertTrue(matcher.match(request));
matcher = new HttpRequestParamsMatcher("a ", "a =1", "b", "b=2"); matcher = new HttpRequestParamsMatcher("a ", "a =1", "b", "b=2");
request.setURI(URI.create("http://dummy/?a&a=1&b")); request.setURI(URI.create("http://dummy/?a&a=1&b"));
Assert.assertTrue(matcher.match(request)); Assert.assertTrue(matcher.match(request));
request.setURI(URI.create("http://dummy/?a&a=1&b&b=2")); request.setURI(URI.create("http://dummy/?a&a=1&b&b=2"));
Assert.assertTrue(matcher.match(request)); Assert.assertTrue(matcher.match(request));
matcher = new HttpRequestParamsMatcher("a ", "a =1", "b", "b=2", "b = 3 "); matcher = new HttpRequestParamsMatcher("a ", "a =1", "b", "b=2", "b = 3 ");
request.setURI(URI.create("http://dummy/?a&a=1&b&b=2&b=3")); request.setURI(URI.create("http://dummy/?a&a=1&b&b=2&b=3"));
Assert.assertTrue(matcher.match(request)); Assert.assertTrue(matcher.match(request));
request.setURI(URI.create("http://dummy/?d=1")); request.setURI(URI.create("http://dummy/?d=1"));
Assert.assertFalse(matcher.match(request)); Assert.assertFalse(matcher.match(request));
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,45 +15,46 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import static com.alibaba.cloud.dubbo.http.DefaultHttpRequest.builder;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.HttpRequest; import org.springframework.http.HttpRequest;
import static com.alibaba.cloud.dubbo.http.DefaultHttpRequest.builder;
/** /**
* {@link ParamExpression} Test * {@link ParamExpression} Test
* *
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
*/ */
public class ParamExpressionTest extends AbstractNameValueExpressionTest<ParamExpression> { public class ParamExpressionTest
extends AbstractNameValueExpressionTest<ParamExpression> {
@Test @Test
public void testIsCaseSensitiveName() { public void testIsCaseSensitiveName() {
Assert.assertTrue(createExpression("a=1").isCaseSensitiveName()); Assert.assertTrue(createExpression("a=1").isCaseSensitiveName());
Assert.assertTrue(createExpression("a=!1").isCaseSensitiveName()); Assert.assertTrue(createExpression("a=!1").isCaseSensitiveName());
Assert.assertTrue(createExpression("b=1").isCaseSensitiveName()); Assert.assertTrue(createExpression("b=1").isCaseSensitiveName());
} }
@Test @Test
public void testMatch() { public void testMatch() {
ParamExpression expression = createExpression("a=1"); ParamExpression expression = createExpression("a=1");
HttpRequest request = builder().build(); HttpRequest request = builder().build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().param("a", "").build(); request = builder().param("a", "").build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().param("a", "2").build(); request = builder().param("a", "2").build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().param("", "1").build(); request = builder().param("", "1").build();
Assert.assertFalse(expression.match(request)); Assert.assertFalse(expression.match(request));
request = builder().param("a", "1").build(); request = builder().param("a", "1").build();
Assert.assertTrue(expression.match(request)); Assert.assertTrue(expression.match(request));
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,25 +15,28 @@
*/ */
package com.alibaba.cloud.dubbo.http.matcher; package com.alibaba.cloud.dubbo.http.matcher;
import java.util.Arrays;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import java.util.Arrays;
/** /**
* {@link ProduceMediaTypeExpression} Test * {@link ProduceMediaTypeExpression} Test
* *
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
*/ */
public class ProduceMediaTypeExpressionTest extends AbstractMediaTypeExpressionTest<ProduceMediaTypeExpression> { public class ProduceMediaTypeExpressionTest
extends AbstractMediaTypeExpressionTest<ProduceMediaTypeExpression> {
@Test @Test
public void testMatch() { public void testMatch() {
ProduceMediaTypeExpression expression = createExpression(MediaType.APPLICATION_JSON_VALUE); ProduceMediaTypeExpression expression = createExpression(
Assert.assertTrue(expression.match(Arrays.asList(MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON))); MediaType.APPLICATION_JSON_VALUE);
Assert.assertTrue(expression.match(
Arrays.asList(MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON)));
expression = createExpression(MediaType.APPLICATION_JSON_VALUE); expression = createExpression(MediaType.APPLICATION_JSON_VALUE);
Assert.assertFalse(expression.match(Arrays.asList(MediaType.APPLICATION_XML))); Assert.assertFalse(expression.match(Arrays.asList(MediaType.APPLICATION_XML)));
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,16 +25,16 @@ import org.junit.Test;
*/ */
public class HttpUtilsTest { public class HttpUtilsTest {
@Test @Test
public void testEncodeAndDecode() { public void testEncodeAndDecode() {
String whitespace = " "; String whitespace = " ";
String encodedValue = HttpUtils.encode(" "); String encodedValue = HttpUtils.encode(" ");
String decodedValue = HttpUtils.decode(encodedValue); String decodedValue = HttpUtils.decode(encodedValue);
Assert.assertEquals(whitespace, decodedValue); Assert.assertEquals(whitespace, decodedValue);
} }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,13 +15,13 @@
*/ */
package com.alibaba.cloud.dubbo.metadata; package com.alibaba.cloud.dubbo.metadata;
import org.junit.Assert;
import org.junit.Test;
import java.util.Arrays; import java.util.Arrays;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
import org.junit.Assert;
import org.junit.Test;
/** /**
* {@link RequestMetadata} Test * {@link RequestMetadata} Test
* *
@@ -30,107 +29,108 @@ import java.util.Set;
*/ */
public class RequestMetadataTest { public class RequestMetadataTest {
private String method = "GET"; private String method = "GET";
private String url = "/param"; private String url = "/param";
private Set<String> paramNames = new LinkedHashSet<>(Arrays.asList("a", "b", "c")); private Set<String> paramNames = new LinkedHashSet<>(Arrays.asList("a", "b", "c"));
private Set<String> headerNames = new LinkedHashSet<>(Arrays.asList("d", "e", "f")); private Set<String> headerNames = new LinkedHashSet<>(Arrays.asList("d", "e", "f"));
@Test @Test
public void testEqualsAndHashCodeAndCompareTo() { public void testEqualsAndHashCodeAndCompareTo() {
RequestMetadata metadata = new RequestMetadata(); RequestMetadata metadata = new RequestMetadata();
RequestMetadata metadata2 = new RequestMetadata(); RequestMetadata metadata2 = new RequestMetadata();
Assert.assertEquals(metadata, metadata2); Assert.assertEquals(metadata, metadata2);
Assert.assertEquals(metadata.hashCode(), metadata2.hashCode()); Assert.assertEquals(metadata.hashCode(), metadata2.hashCode());
metadata.setMethod(method); metadata.setMethod(method);
metadata2.setMethod(method); metadata2.setMethod(method);
Assert.assertEquals(metadata, metadata2); Assert.assertEquals(metadata, metadata2);
Assert.assertEquals(metadata.hashCode(), metadata2.hashCode()); Assert.assertEquals(metadata.hashCode(), metadata2.hashCode());
metadata.setPath(url); metadata.setPath(url);
metadata2.setPath(url); metadata2.setPath(url);
Assert.assertEquals(metadata, metadata2); Assert.assertEquals(metadata, metadata2);
Assert.assertEquals(metadata.hashCode(), metadata2.hashCode()); Assert.assertEquals(metadata.hashCode(), metadata2.hashCode());
metadata.addParam("a", "1").addParam("b", "2").addParam("c", "3"); metadata.addParam("a", "1").addParam("b", "2").addParam("c", "3");
metadata2.addParam("a", "1a").addParam("b", "2b").addParam("c", "3c"); metadata2.addParam("a", "1a").addParam("b", "2b").addParam("c", "3c");
Assert.assertEquals(metadata, metadata2); Assert.assertEquals(metadata, metadata2);
Assert.assertEquals(metadata.hashCode(), metadata2.hashCode()); Assert.assertEquals(metadata.hashCode(), metadata2.hashCode());
metadata.addHeader("d", "1").addHeader("e", "2").addHeader("f", "3"); metadata.addHeader("d", "1").addHeader("e", "2").addHeader("f", "3");
metadata2.addHeader("d", "1").addHeader("e", "2"); metadata2.addHeader("d", "1").addHeader("e", "2");
Assert.assertNotEquals(metadata, metadata2); Assert.assertNotEquals(metadata, metadata2);
Assert.assertNotEquals(metadata.hashCode(), metadata2.hashCode()); Assert.assertNotEquals(metadata.hashCode(), metadata2.hashCode());
} }
// @Test // @Test
// public void testBestMatch() { // public void testBestMatch() {
// //
// NavigableMap<RequestMetadata, RequestMetadata> requestMetadataMap = new TreeMap<>(); // NavigableMap<RequestMetadata, RequestMetadata> requestMetadataMap = new
// // TreeMap<>();
// RequestMetadata metadata = new RequestMetadata(); //
// metadata.setMethod(method); // RequestMetadata metadata = new RequestMetadata();
// // metadata.setMethod(method);
// RequestMetadata metadata1 = new RequestMetadata(); //
// metadata1.setMethod(method); // RequestMetadata metadata1 = new RequestMetadata();
// metadata1.setPath(url); // metadata1.setMethod(method);
// // metadata1.setPath(url);
// RequestMetadata metadata2 = new RequestMetadata(); //
// metadata2.setMethod(method); // RequestMetadata metadata2 = new RequestMetadata();
// metadata2.setPath(url); // metadata2.setMethod(method);
// metadata2.setParams(paramNames); // metadata2.setPath(url);
// // metadata2.setParams(paramNames);
// RequestMetadata metadata3 = new RequestMetadata(); //
// metadata3.setMethod(method); // RequestMetadata metadata3 = new RequestMetadata();
// metadata3.setPath(url); // metadata3.setMethod(method);
// metadata3.setParams(paramNames); // metadata3.setPath(url);
// metadata3.setHeaders(headerNames); // metadata3.setParams(paramNames);
// // metadata3.setHeaders(headerNames);
// requestMetadataMap.put(metadata, metadata); //
// requestMetadataMap.put(metadata1, metadata1); // requestMetadataMap.put(metadata, metadata);
// requestMetadataMap.put(metadata2, metadata2); // requestMetadataMap.put(metadata1, metadata1);
// requestMetadataMap.put(metadata3, metadata3); // requestMetadataMap.put(metadata2, metadata2);
// // requestMetadataMap.put(metadata3, metadata3);
// RequestMetadata result = getBestMatch(requestMetadataMap, metadata); //
// Assert.assertEquals(result, metadata); // RequestMetadata result = getBestMatch(requestMetadataMap, metadata);
// // Assert.assertEquals(result, metadata);
// result = getBestMatch(requestMetadataMap, metadata1); //
// Assert.assertEquals(result, metadata1); // result = getBestMatch(requestMetadataMap, metadata1);
// // Assert.assertEquals(result, metadata1);
// result = getBestMatch(requestMetadataMap, metadata2); //
// Assert.assertEquals(result, metadata2); // result = getBestMatch(requestMetadataMap, metadata2);
// // Assert.assertEquals(result, metadata2);
// result = getBestMatch(requestMetadataMap, metadata3); //
// Assert.assertEquals(result, metadata3); // result = getBestMatch(requestMetadataMap, metadata3);
// // Assert.assertEquals(result, metadata3);
// // REDO //
// requestMetadataMap.clear(); // // REDO
// // requestMetadataMap.clear();
// requestMetadataMap.put(metadata1, metadata1); //
// // requestMetadataMap.put(metadata1, metadata1);
// result = getBestMatch(requestMetadataMap, metadata2); //
// Assert.assertEquals(metadata1, result); // result = getBestMatch(requestMetadataMap, metadata2);
// // Assert.assertEquals(metadata1, result);
// requestMetadataMap.put(metadata2, metadata2); //
// // requestMetadataMap.put(metadata2, metadata2);
// result = getBestMatch(requestMetadataMap, metadata3); //
// Assert.assertEquals(metadata2, result); // result = getBestMatch(requestMetadataMap, metadata3);
// // Assert.assertEquals(metadata2, result);
// result = getBestMatch(requestMetadataMap, new RequestMetadata()); //
// Assert.assertNull(result); // result = getBestMatch(requestMetadataMap, new RequestMetadata());
// // Assert.assertNull(result);
// result = getBestMatch(requestMetadataMap, metadata); //
// Assert.assertNull(result); // result = getBestMatch(requestMetadataMap, metadata);
// // Assert.assertNull(result);
// } //
// }
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,15 +15,16 @@
*/ */
package com.alibaba.cloud.dubbo.metadata.resolver; package com.alibaba.cloud.dubbo.metadata.resolver;
import java.util.Set;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import com.alibaba.cloud.dubbo.annotation.DubboTransported;
import com.alibaba.cloud.dubbo.metadata.DubboTransportedMethodMetadata;
import org.springframework.cloud.openfeign.support.SpringMvcContract; import org.springframework.cloud.openfeign.support.SpringMvcContract;
import org.springframework.mock.env.MockEnvironment; import org.springframework.mock.env.MockEnvironment;
import java.util.Set; import com.alibaba.cloud.dubbo.annotation.DubboTransported;
import com.alibaba.cloud.dubbo.metadata.DubboTransportedMethodMetadata;
/** /**
* {@link DubboTransportedMethodMetadataResolver} Test * {@link DubboTransportedMethodMetadataResolver} Test
@@ -33,27 +33,28 @@ import java.util.Set;
*/ */
public class DubboTransportedMethodMetadataResolverTest { public class DubboTransportedMethodMetadataResolverTest {
private DubboTransportedMethodMetadataResolver resolver; private DubboTransportedMethodMetadataResolver resolver;
private MockEnvironment environment; private MockEnvironment environment;
@Before @Before
public void init() { public void init() {
environment = new MockEnvironment(); environment = new MockEnvironment();
resolver = new DubboTransportedMethodMetadataResolver(environment, new SpringMvcContract()); resolver = new DubboTransportedMethodMetadataResolver(environment,
} new SpringMvcContract());
}
@Test @Test
public void testResolve() { public void testResolve() {
Set<DubboTransportedMethodMetadata> metadataSet = resolver.resolveDubboTransportedMethodMetadataSet(TestDefaultService.class); Set<DubboTransportedMethodMetadata> metadataSet = resolver
Assert.assertEquals(1, metadataSet.size()); .resolveDubboTransportedMethodMetadataSet(TestDefaultService.class);
} Assert.assertEquals(1, metadataSet.size());
}
@DubboTransported
interface TestDefaultService {
@DubboTransported String test(String message);
interface TestDefaultService {
String test(String message); }
}
} }

View File

@@ -1,12 +1,11 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright (C) 2018 the original author or authors.
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

Some files were not shown because too many files have changed in this diff Show More