Class WebConfig

java.lang.Object
com.easydesk.modules.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
Spring boot 에 Interceptor 를 등록한다. WebConfig
  • Constructor Summary

    Constructors
    Constructor
    Description
    WebConfig(LocaleContextInterceptor localeContextInterceptor, TransactionContextInterceptor transactionContextInterceptor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
    등록된 interceptor 실행 순서 1.

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

  • Method Details

    • addInterceptors

      public void addInterceptors(@NonNull org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
      등록된 interceptor 실행 순서 1. 등록 순서데로 실행 registry.addInterceptor(localeContextInterceptor) .addPathPatterns("/**"); 또는 2. 순서를 지정하는 방범 registry.addInterceptor(loggingInterceptor) .addPathPatterns("/**") .order(1); // 1번 우선순위 (가장 먼저 실행)
      Specified by:
      addInterceptors in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer