完成PathPattern 的测试
This commit is contained in:
parent
2c1c768271
commit
88de2eb5db
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user