diff --git a/dongtai-api-gather/dongtai-api-gather-spring-api/src/main/java/io/dongtai/iast/api/gather/spring/convertor/RequestMappingInfoConvertor.java b/dongtai-api-gather/dongtai-api-gather-spring-api/src/main/java/io/dongtai/iast/api/gather/spring/convertor/RequestMappingInfoConvertor.java index e11856eac..e953696a1 100644 --- a/dongtai-api-gather/dongtai-api-gather-spring-api/src/main/java/io/dongtai/iast/api/gather/spring/convertor/RequestMappingInfoConvertor.java +++ b/dongtai-api-gather/dongtai-api-gather-spring-api/src/main/java/io/dongtai/iast/api/gather/spring/convertor/RequestMappingInfoConvertor.java @@ -100,7 +100,15 @@ private void parseRequestMethodsRequestCondition(Path path) { Set methods = c.getMethods(); // 如果此处默认为空的话,则将其扩展为所有的情况 if (methods.isEmpty()) { - methods = new HashSet<>(Arrays.asList(RequestMethod.values())); + // 2023-7-4 12:31:06 默认情况下认为方法不映射trace + methods = new HashSet<>(Arrays.asList(RequestMethod.GET, + RequestMethod.HEAD, + RequestMethod.POST, + RequestMethod.PUT, + RequestMethod.PATCH, + RequestMethod.DELETE, + RequestMethod.OPTIONS + )); } methods.forEach(new Consumer() { @Override @@ -128,9 +136,10 @@ public void accept(RequestMethod requestMethod) { case OPTIONS: path.setOptions(operation); break; - case TRACE: - path.setTrace(operation); - break; + // 2023-7-4 12:30:52 忽略所有的trace方法 +// case TRACE: +// path.setTrace(operation); +// break; } } });