| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.method.HandlerMethod; |
| | |
| | | |
| | | @Component |
| | | @Order(-2147481647) |
| | | @ConditionalOnProperty(name ="enable" ,prefix = "swagger",havingValue = "true",matchIfMissing = true) |
| | | public class SwaggerPlugin implements OperationBuilderPlugin { |
| | | private static final Logger log = LoggerFactory.getLogger(SwaggerPlugin.class); |
| | | |
| | | |
| | | @Override |
| | | public void apply(OperationContext operationContext) { |
| | | RequestMappingContext requestContext = (RequestMappingContext) BeanUtil.getProperty(operationContext, "requestContext"); |
| | | WebMvcRequestHandler handler = (WebMvcRequestHandler) BeanUtil.getProperty(requestContext, "handler"); |