@Configuration public class WebConfigurer extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
| 构造器和说明 |
|---|
WebConfigurer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry)
跨域配置
|
void |
addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) |
void |
addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry) |
void |
configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
Long转为String返回,防止前端使用number类型损失精度
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addFormatters, addInterceptors, addReturnValueHandlers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidatorpublic void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
addResourceHandlers 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerpublic void addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
addViewControllers 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerpublic void addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry)
addCorsMappings 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerpublic void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
configureMessageConverters 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerCopyright © 2023. All rights reserved.