Class WebMvcConfig

java.lang.Object
edu.tufts.hrilab.gui.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
Web MVC Configuration for handling CORS policies and static resource locations. Customizes the Spring MVC framework for specific needs such as handling CORS and serving static resources.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry)
    Configures CORS mappings to allow cross-origin requests to specific paths.
    void
    addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
    Configures resource handlers to serve static resources.

    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, addFormatters, addInterceptors, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
  • Constructor Details

    • WebMvcConfig

      public WebMvcConfig()
  • Method Details

    • addResourceHandlers

      public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
      Configures resource handlers to serve static resources. This method maps URL patterns to physical paths.
      Specified by:
      addResourceHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      registry - ResourceHandlerRegistry to configure.
    • addCorsMappings

      public void addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry)
      Configures CORS mappings to allow cross-origin requests to specific paths.
      Specified by:
      addCorsMappings in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      registry - CorsRegistry to configure.