|
@@ -1,11 +1,9 @@
|
|
package com.fdkankan.ucenter.config;
|
|
package com.fdkankan.ucenter.config;
|
|
|
|
|
|
import com.fdkankan.ucenter.interceptor.AppInterceptor;
|
|
import com.fdkankan.ucenter.interceptor.AppInterceptor;
|
|
-import com.fdkankan.ucenter.interceptor.InnerApiInterceptor;
|
|
|
|
import com.fdkankan.ucenter.interceptor.UcenterInterceptor;
|
|
import com.fdkankan.ucenter.interceptor.UcenterInterceptor;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
@@ -18,16 +16,10 @@ public class WebAppConfig implements WebMvcConfigurer {
|
|
UcenterInterceptor ucenterInterceptor;
|
|
UcenterInterceptor ucenterInterceptor;
|
|
@Autowired
|
|
@Autowired
|
|
AppInterceptor appInterceptor;
|
|
AppInterceptor appInterceptor;
|
|
- @Autowired
|
|
|
|
- private InnerApiInterceptor innerApiInterceptor;
|
|
|
|
-
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
|
|
- //内部接口拦截器
|
|
|
|
- registry.addInterceptor(innerApiInterceptor).addPathPatterns("/_inner/**");
|
|
|
|
-
|
|
|
|
registry.addInterceptor(ucenterInterceptor).addPathPatterns("/**")
|
|
registry.addInterceptor(ucenterInterceptor).addPathPatterns("/**")
|
|
.excludePathPatterns(
|
|
.excludePathPatterns(
|
|
//"/user/virtualOrder/**",
|
|
//"/user/virtualOrder/**",
|