Class WebConfig

java.lang.Object
com.endurancetrio.app.config.WebConfig
All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration public class WebConfig extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Web configuration class that customizes Spring MVC configuration. This class implements WebMvcConfigurer to customize various aspects of Spring MVC, including view controllers, resource handlers, and interceptors.
See Also:
  • WebMvcConfigurer
  • ViewControllerRegistry
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
    Registers view controllers to handle direct URL-to-view mapping without requiring explicit controller methods.
    org.springframework.boot.web.servlet.FilterRegistrationBean<jakarta.servlet.Filter>
     
    org.springframework.web.servlet.LocaleResolver
     

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

    • WebConfig

      public WebConfig()
  • Method Details

    • localeResolver

      @Bean public org.springframework.web.servlet.LocaleResolver localeResolver()
    • localeRedirectFilter

      @Bean public org.springframework.boot.web.servlet.FilterRegistrationBean<jakarta.servlet.Filter> localeRedirectFilter()
    • addViewControllers

      public void addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
      Registers view controllers to handle direct URL-to-view mapping without requiring explicit controller methods.
      Specified by:
      addViewControllers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      registry - the ViewControllerRegistry to which view controllers will be added, allowing for URL path to view name mappings and redirect configurations
      See Also:
      • ViewControllerRegistry