@Configuration
@EnableSwagger2
@EnableKnife4j
@ConditionalOnProperty(name="custom.swagger.enabled",
havingValue="true",
matchIfMissing=false)
@EnableConfigurationProperties(value=SwaggerProperties.class)
public class Swagger2Configure
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
| 构造器和说明 |
|---|
Swagger2Configure() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
通用拦截器排除swagger设置,所有拦截器都会自动加swagger相关的资源排除信息
|
springfox.documentation.spring.web.plugins.Docket |
createRestApi() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addCorsMappings, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator@Bean public springfox.documentation.spring.web.plugins.Docket createRestApi()
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
addInterceptors 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerCopyright © 2020. All rights reserved.