Package com.bytedesk.core.config
Class WebMvcConfig
java.lang.Object
com.bytedesk.core.config.WebMvcConfig
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
public class WebMvcConfig
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
private IpAccessInterceptor
private BlackAccessInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInterceptors
(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) void
addResourceHandlers
(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) https://www.baeldung.com/spring-mvc-static-resources spring.mvc.static-path-pattern=/** 静态资源的配置 - 使得可以从磁盘中读取 Html、图片、视频、音频等Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Field Details
-
CLASSPATH_RESOURCE_LOCATIONS
-
ipAccessInterceptor
-
visitorAccessInterceptor
-
-
Constructor Details
-
WebMvcConfig
public WebMvcConfig()
-
-
Method Details
-
addInterceptors
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) - Specified by:
addInterceptors
in interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addResourceHandlers
public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) https://www.baeldung.com/spring-mvc-static-resources spring.mvc.static-path-pattern=/** 静态资源的配置 - 使得可以从磁盘中读取 Html、图片、视频、音频等- Specified by:
addResourceHandlers
in interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-