| | |
| | | package com.zy.common.config; |
| | | |
| | | import com.zy.common.i18n.RequestLocaleInterceptor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | |
| | | public class WebConfig implements WebMvcConfigurer { |
| | | |
| | | @Autowired |
| | | private RequestLocaleInterceptor requestLocaleInterceptor; |
| | | |
| | | @Autowired |
| | | private AdminInterceptor adminInterceptor; |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(requestLocaleInterceptor) |
| | | .addPathPatterns("/**"); |
| | | registry.addInterceptor(adminInterceptor) |
| | | .addPathPatterns("/**") |
| | | ; |