减少了警告
This commit is contained in:
parent
4c2280e543
commit
0e0366e8bb
|
@ -14,7 +14,6 @@ import org.springframework.cloud.gateway.filter.GatewayFilter;
|
|||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.OrderedGatewayFilter;
|
||||
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
|
||||
import org.springframework.cloud.gateway.filter.factory.RequestRateLimiterGatewayFilterFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
|
@ -25,11 +24,9 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
import cn.ecpark.service.usergw.biz.filters.bean.GenericServicePool;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import reactor.core.publisher.Mono;;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DubboGatewayFilterFactory extends AbstractGatewayFilterFactory<DubboGatewayFilterFactory.Config> {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -387,6 +387,7 @@ public class ConfigGateway implements RouteDefinitionLocator {
|
|||
* @param iter dubbo.routes.filters
|
||||
* @param yamlField 根据域的key 获取 filters 字符串列
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private void parseAndAddDubboFilters(String dubboUri, List<FilterDefinition> filters,
|
||||
LinkedHashMap<String, List<String>> iter, String yamlField) {
|
||||
List<String> filtersYaml = iter.get(yamlField);
|
||||
|
@ -404,7 +405,7 @@ public class ConfigGateway implements RouteDefinitionLocator {
|
|||
filters.add(fd);
|
||||
}
|
||||
} else if (filterObject.getClass() == LinkedHashMap.class) {
|
||||
Map<String, Object> filterMap = (LinkedHashMap)filterObject;
|
||||
Map<String, Object> filterMap = (LinkedHashMap<String, Object>)filterObject;
|
||||
FilterDefinition fd = new FilterDefinition();
|
||||
|
||||
fd.setName((String)filterMap.get("name"));
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package cn.ecpark.service.usergw;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
package cn.ecpark.service.usergw;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.cloud.gateway.filter.factory.RequestRateLimiterGatewayFilterFactory;
|
||||
import org.springframework.cloud.gateway.filter.factory.SetRequestHeaderGatewayFilterFactory;
|
||||
import org.springframework.data.redis.core.ReactiveRedisTemplate;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
|
@ -55,12 +48,12 @@ public class TestHttp2DubboConfig4 {
|
|||
}
|
||||
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void Test3RestfulFilters() {
|
||||
// @Test
|
||||
// @SuppressWarnings("unchecked")
|
||||
// public void Test3RestfulFilters() {
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user