| Line 9... |
Line 9... |
| 9 |
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
9 |
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
| 10 |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
10 |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
| 11 |
|
11 |
|
| 12 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
12 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 13 |
import com.spice.profitmandi.web.interceptor.ApiRequestInterceptor;
|
13 |
import com.spice.profitmandi.web.interceptor.ApiRequestInterceptor;
|
| - |
|
14 |
import com.spice.profitmandi.web.interceptor.GoogleLoginRequestInterceptor;
|
| 14 |
import com.spice.profitmandi.web.interceptor.RoleRequestInterceptor;
|
15 |
import com.spice.profitmandi.web.interceptor.RoleRequestInterceptor;
|
| 15 |
|
16 |
|
| 16 |
import springfox.documentation.builders.PathSelectors;
|
17 |
import springfox.documentation.builders.PathSelectors;
|
| 17 |
import springfox.documentation.builders.RequestHandlerSelectors;
|
18 |
import springfox.documentation.builders.RequestHandlerSelectors;
|
| 18 |
import springfox.documentation.service.ApiInfo;
|
19 |
import springfox.documentation.service.ApiInfo;
|
| Line 33... |
Line 34... |
| 33 |
ApiRequestInterceptor apiRequestInterceptor;
|
34 |
ApiRequestInterceptor apiRequestInterceptor;
|
| 34 |
|
35 |
|
| 35 |
@Autowired
|
36 |
@Autowired
|
| 36 |
RoleRequestInterceptor roleRequestInterceptor;
|
37 |
RoleRequestInterceptor roleRequestInterceptor;
|
| 37 |
|
38 |
|
| - |
|
39 |
@Autowired
|
| - |
|
40 |
GoogleLoginRequestInterceptor googleLoginRequestInterceptor;
|
| - |
|
41 |
|
| 38 |
|
42 |
|
| 39 |
@Bean
|
43 |
@Bean
|
| 40 |
public Docket api() {
|
44 |
public Docket api() {
|
| 41 |
return new Docket(DocumentationType.SWAGGER_2).select()
|
45 |
return new Docket(DocumentationType.SWAGGER_2).select()
|
| 42 |
.apis(RequestHandlerSelectors.any())
|
46 |
.apis(RequestHandlerSelectors.any())
|
| Line 55... |
Line 59... |
| 55 |
|
59 |
|
| 56 |
@Override
|
60 |
@Override
|
| 57 |
public void addInterceptors(InterceptorRegistry registry) {
|
61 |
public void addInterceptors(InterceptorRegistry registry) {
|
| 58 |
registry.addInterceptor(apiRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_API, ProfitMandiConstants.URL_API + "/");
|
62 |
registry.addInterceptor(apiRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_API, ProfitMandiConstants.URL_API + "/");
|
| 59 |
registry.addInterceptor(roleRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_ROLE, ProfitMandiConstants.URL_ROLE + "/");
|
63 |
registry.addInterceptor(roleRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_ROLE, ProfitMandiConstants.URL_ROLE + "/");
|
| - |
|
64 |
registry.addInterceptor(googleLoginRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, ProfitMandiConstants.URL_USER_GOOGLE_LOGIN + "/");
|
| 60 |
}
|
65 |
}
|
| 61 |
|
66 |
|
| 62 |
private ApiInfo apiInfo() {
|
67 |
private ApiInfo apiInfo() {
|
| 63 |
@SuppressWarnings("deprecation")
|
68 |
@SuppressWarnings("deprecation")
|
| 64 |
ApiInfo apiInfo = new ApiInfo(
|
69 |
ApiInfo apiInfo = new ApiInfo(
|