diff --git a/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigProperties.java b/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigProperties.java index 62a2820..9b462b1 100644 --- a/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigProperties.java +++ b/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigProperties.java @@ -37,6 +37,8 @@ import org.springframework.web.reactive.result.condition.PatternsRequestConditio import org.springframework.web.reactive.result.condition.RequestMethodsRequestCondition; import org.springframework.web.reactive.result.method.RequestMappingInfo; import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping; +import org.springframework.web.util.pattern.PathPattern; +import org.springframework.web.util.pattern.PathPatternParser; import cn.ecpark.service.usergw.utils.Convert; import lombok.extern.slf4j.Slf4j; @@ -133,8 +135,9 @@ public class ConfigProperties { // requestMapping.registerMapping(mapping, handler, method); Method targetMethod = ReflectionUtils.findMethod(ApiController.class, getHandlerMethodName("")); // 找到处理该路由的方法 - - PatternsRequestCondition patternsRequestCondition = new PatternsRequestCondition(api); + PathPatternParser pathPatternParser = new PathPatternParser(); + PathPattern p = pathPatternParser.parse("/test/xixi"); + PatternsRequestCondition patternsRequestCondition = new PatternsRequestCondition(p); RequestMethodsRequestCondition requestMethodsRequestCondition = new RequestMethodsRequestCondition(getRequestMethod(requestMethod)); RequestMappingInfo mapping_info = new RequestMappingInfo(patternsRequestCondition, requestMethodsRequestCondition, null, null, null, null, null);