| 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.CreateUserRequestInterceptor;
|
| 14 |
import com.spice.profitmandi.web.interceptor.GoogleLoginRequestInterceptor;
|
15 |
import com.spice.profitmandi.web.interceptor.GoogleLoginRequestInterceptor;
|
| 15 |
import com.spice.profitmandi.web.interceptor.RoleRequestInterceptor;
|
16 |
import com.spice.profitmandi.web.interceptor.RoleRequestInterceptor;
|
| 16 |
|
17 |
|
| 17 |
import springfox.documentation.builders.PathSelectors;
|
18 |
import springfox.documentation.builders.PathSelectors;
|
| 18 |
import springfox.documentation.builders.RequestHandlerSelectors;
|
19 |
import springfox.documentation.builders.RequestHandlerSelectors;
|
| Line 37... |
Line 38... |
| 37 |
RoleRequestInterceptor roleRequestInterceptor;
|
38 |
RoleRequestInterceptor roleRequestInterceptor;
|
| 38 |
|
39 |
|
| 39 |
@Autowired
|
40 |
@Autowired
|
| 40 |
GoogleLoginRequestInterceptor googleLoginRequestInterceptor;
|
41 |
GoogleLoginRequestInterceptor googleLoginRequestInterceptor;
|
| 41 |
|
42 |
|
| - |
|
43 |
@Autowired
|
| - |
|
44 |
CreateUserRequestInterceptor createUserRequestInterceptor;
|
| 42 |
|
45 |
|
| 43 |
@Bean
|
46 |
@Bean
|
| 44 |
public Docket api() {
|
47 |
public Docket api() {
|
| 45 |
return new Docket(DocumentationType.SWAGGER_2).select()
|
48 |
return new Docket(DocumentationType.SWAGGER_2).select()
|
| 46 |
.apis(RequestHandlerSelectors.any())
|
49 |
.apis(RequestHandlerSelectors.any())
|
| Line 60... |
Line 63... |
| 60 |
@Override
|
63 |
@Override
|
| 61 |
public void addInterceptors(InterceptorRegistry registry) {
|
64 |
public void addInterceptors(InterceptorRegistry registry) {
|
| 62 |
registry.addInterceptor(apiRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_API, ProfitMandiConstants.URL_API + "/");
|
65 |
registry.addInterceptor(apiRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_API, ProfitMandiConstants.URL_API + "/");
|
| 63 |
registry.addInterceptor(roleRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_ROLE, ProfitMandiConstants.URL_ROLE + "/");
|
66 |
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 + "/");
|
67 |
registry.addInterceptor(googleLoginRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, ProfitMandiConstants.URL_USER_GOOGLE_LOGIN + "/");
|
| - |
|
68 |
registry.addInterceptor(createUserRequestInterceptor).addPathPatterns(ProfitMandiConstants.URL_USER, ProfitMandiConstants.URL_USER + "/");
|
| 65 |
}
|
69 |
}
|
| 66 |
|
70 |
|
| 67 |
private ApiInfo apiInfo() {
|
71 |
private ApiInfo apiInfo() {
|
| 68 |
@SuppressWarnings("deprecation")
|
72 |
@SuppressWarnings("deprecation")
|
| 69 |
ApiInfo apiInfo = new ApiInfo(
|
73 |
ApiInfo apiInfo = new ApiInfo(
|