Class ResourceHandlerConfig

java.lang.Object
app.YUP.config.ResourceHandlerConfig
All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration public class ResourceHandlerConfig extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Configuration class for resource handlers. This class is responsible for setting up the resource handlers for static resources. It defines resource handlers for the "/style/**", "/script/**", and "/images/**" URL patterns. The resources are served from the classpath under the "/static/style/", "/static/script/", and "/static/images/" directories respectively. It is annotated with @Configuration to indicate that it is a Spring configuration class. It implements the WebMvcConfigurer interface to customize Spring MVC's configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
    This method is overridden to add resource handlers for serving 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, addCorsMappings, addFormatters, addInterceptors, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
  • Constructor Details

    • ResourceHandlerConfig

      public ResourceHandlerConfig()
  • Method Details

    • addResourceHandlers

      public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
      This method is overridden to add resource handlers for serving static resources. It adds resource handlers for the "/style/**", "/script/**", and "/images/**" URL patterns. The resources are served from the classpath under the "/static/style/", "/static/script/", and "/static/images/" directories respectively.
      Specified by:
      addResourceHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      registry - the ResourceHandlerRegistry for registering resource handlers