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

    Fields
    Modifier and Type
    Field
    Description
    private static final String[]
     
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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

      private static final String[] CLASSPATH_RESOURCE_LOCATIONS
    • ipAccessInterceptor

      @Autowired private IpAccessInterceptor ipAccessInterceptor
    • visitorAccessInterceptor

      @Autowired private BlackAccessInterceptor visitorAccessInterceptor
  • Constructor Details

    • WebMvcConfig

      public WebMvcConfig()
  • Method Details

    • addInterceptors

      public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
      Specified by:
      addInterceptors in interface org.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 interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer