| | |
| | |
|
| | | import cc.mrbird.febs.common.interceptor.LoginInterceptor;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
|
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
| | |
| | | registration.excludePathPatterns("/api/pay/**");
|
| | | registration.excludePathPatterns("/api/news/**");
|
| | | registration.excludePathPatterns("/api/member/cashOutSetting");
|
| | | registration.excludePathPatterns("/api/member/agentDetail");
|
| | | registration.excludePathPatterns("/api/member/activityInfo");
|
| | | registration.excludePathPatterns("/api/leader/leaderList");
|
| | | registration.excludePathPatterns("/api/leader/leaderTitle");
|
| | | registration.excludePathPatterns("/api/leader/leaderListInFence");
|
| | | registration.excludePathPatterns("/api/leader/noLoginLeaderTitle");
|
| | | registration.excludePathPatterns("/api/xcxPay/wxpayCallback");
|
| | | registration.excludePathPatterns("/api/xcxPay/rechargeCallBack");
|
| | | registration.excludePathPatterns("/api/xcxPay/fapiaoCallBack");
|
| | | registration.excludePathPatterns("/api/fuPay/callback");
|
| | |
|
| | | // 添加Swagger UI相关路径
|
| | | registration.excludePathPatterns("/api/swagger-ui.html");
|
| | | registration.excludePathPatterns("/v2/api-docs");
|
| | | registration.excludePathPatterns("/configuration/ui");
|
| | | registration.excludePathPatterns("/configuration/security");
|
| | | registration.excludePathPatterns("/swagger-resources");
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void addCorsMappings( CorsRegistry registry) {
|
| | | // 跨域请求配置
|
| | | registry.addMapping("/**")//允许请求路径
|
| | | .allowedOrigins("*")//表示允许所有网址发起跨域请求
|
| | | .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")//表示允许跨域请求的方法
|
| | | .maxAge(3600)//表示在3600秒内不需要再发送预校验请求
|
| | | .allowCredentials(true);//允许客户端携带验证信息,即允许携带cookie
|
| | | }
|
| | | }
|