package com.farriver.bwf.web.initializer; import com.farriver.bwf.web.initializer.interceptor.CrossInterceptor; import com.farriver.bwf.web.initializer.interceptor.OptionsInterceptor; import com.farriver.bwf.web.initializer.interceptor.TokenInterceptor; import com.farriver.bwf.web.initializer.interceptor.WelcomeWebRequestInterceptor; import jakarta.annotation.Resource; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration class WebMvcConfiguration implements WebMvcConfigurer { @Resource private OptionsInterceptor optionsInterceptor; @Resource private CrossInterceptor crossInterceptor; @Resource private TokenInterceptor tokenInterceptor; @Resource private WelcomeWebRequestInterceptor welcomeWebRequestInterceptor; @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(crossInterceptor).addPathPatterns("/**"); registry.addInterceptor(optionsInterceptor).addPathPatterns("/**"); registry.addInterceptor(tokenInterceptor).addPathPatterns("/**"); registry.addWebRequestInterceptor(welcomeWebRequestInterceptor).addPathPatterns("/**"); } }