| File was renamed from src/main/java/com/dji/sample/configuration/GlobalMVCConfigurer.java |
| | |
| | | package com.dji.sample.configuration; |
| | | package com.dji.sample.configuration.mvc; |
| | | |
| | | import com.dji.sample.component.AuthInterceptor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.method.support.HandlerMethodArgumentResolver; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | |
| | | @Value("${url.manage.version}") |
| | | private String manageVersion; |
| | | |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | // Exclude the login interface. |
| | |
| | | // Intercept for all request interfaces. |
| | | registry.addInterceptor(authInterceptor).addPathPatterns("/**").excludePathPatterns(excludePaths); |
| | | } |
| | | |
| | | @Override |
| | | public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) { |
| | | resolvers.add(new GetSnakeArgumentProcessor(true)); |
| | | } |
| | | } |