@Configuration @ConditionalOnMissingBean(value=JvsWebMvcConfigurer.class) public class JvsWebMvcConfigurer extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer, org.springframework.http.client.ClientHttpRequestInterceptor
| 构造器和说明 |
|---|
JvsWebMvcConfigurer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addFormatters(org.springframework.format.FormatterRegistry registry) |
void |
addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
添加拦截器
|
org.springframework.http.client.ClientHttpResponse |
intercept(org.springframework.http.HttpRequest request,
byte[] body,
org.springframework.http.client.ClientHttpRequestExecution execution)
添加RestTemplate插件
将上下文中的版本号, 租户id放入请求头中
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addCorsMappings, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidatorpublic void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
addInterceptors 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerregistry - public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request,
byte[] body,
org.springframework.http.client.ClientHttpRequestExecution execution)
throws IOException
intercept 在接口中 org.springframework.http.client.ClientHttpRequestInterceptorIOExceptionpublic void addFormatters(org.springframework.format.FormatterRegistry registry)
addFormatters 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerCopyright © 2021 jvs. All rights reserved.