部署过滤
This commit is contained in:
parent
68b4c0af01
commit
ecdf3de890
@ -14,68 +14,70 @@ import java.util.List;
|
||||
@Configuration
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
|
||||
@Autowired
|
||||
private AuthenticateInterceptor authenticateInterceptor;
|
||||
@Autowired
|
||||
private AuthenticateInterceptor authenticateInterceptor;
|
||||
|
||||
@Autowired
|
||||
private LicenseInterceptor licenseInterceptor;
|
||||
@Autowired
|
||||
private LicenseInterceptor licenseInterceptor;
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
List<String> licenseWhiteList = new ArrayList<>();
|
||||
licenseWhiteList.add("/api/license/validate");
|
||||
licenseWhiteList.add("/api/license/local");
|
||||
licenseWhiteList.add("/api/licensing/**");
|
||||
registry.addInterceptor(licenseInterceptor).excludePathPatterns(licenseWhiteList);
|
||||
List<String> whiteList = new ArrayList<>();
|
||||
whiteList.add("/doc/**");
|
||||
whiteList.add("/api/login/**");
|
||||
whiteList.add("/api/wxpat/**");
|
||||
whiteList.add("/api/sms/**");
|
||||
whiteList.add("/api/register/**");
|
||||
whiteList.add("/api/userinfo/**");
|
||||
whiteList.add("/api/wechatpay/receive");
|
||||
whiteList.add("/api/alipay/receive");
|
||||
whiteList.add("/api/applet/**");
|
||||
whiteList.add("/api/wxauth/**");
|
||||
whiteList.add("/api/distribute/permission");
|
||||
whiteList.add("/api/v1/jointTraining/permission");
|
||||
whiteList.add("/api/jointTraining/permission");
|
||||
whiteList.add("/api/user/bind/wm");
|
||||
// 运行图工具
|
||||
whiteList.add("/api/rpTools/**");
|
||||
whiteList.add("/api/license/validate");
|
||||
whiteList.add("/api/license/local");
|
||||
// 微信回调接口
|
||||
whiteList.add("/api/wechatPay/receive");
|
||||
// 成都工业留言板
|
||||
whiteList.add("/api/learn/cgy/message/create");
|
||||
whiteList.add("/api/learn/cgy/{messageId}/comment");
|
||||
whiteList.add("/api/learn/{postId}/message/pagedQuery/postId");
|
||||
whiteList.add("GET /api/learn/{messageId}/comment");
|
||||
whiteList.add("/api/learn/cgy/updateMessageTime");
|
||||
// 成都工业使用记录
|
||||
whiteList.add("/api/cgy/**");
|
||||
//项目域名查询
|
||||
whiteList.add("/api/projectServer/project/{project}");
|
||||
whiteList.add("/test/simulation/**");
|
||||
whiteList.add("/api/test/**");
|
||||
whiteList.add("/api/project/viewSetting/simple/all");
|
||||
whiteList.add("/api/project/viewSetting/project/{project}");
|
||||
//旧数据处理
|
||||
whiteList.add("/api/org/oldData/handle");
|
||||
whiteList.add("/api/mapFunction/oldDataHandle");
|
||||
whiteList.add("/api/v2/paper/composition/oldData/handle");
|
||||
whiteList.add("/api/user/sync");
|
||||
whiteList.add("/dataHandle");
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
List<String> licenseWhiteList = new ArrayList<>();
|
||||
licenseWhiteList.add("/api/license/validate");
|
||||
licenseWhiteList.add("/api/license/local");
|
||||
licenseWhiteList.add("/api/licensing/**");
|
||||
licenseWhiteList.add("/api/project/viewSetting/simple/all");
|
||||
licenseWhiteList.add("/api/project/viewSetting/project/{project}");
|
||||
registry.addInterceptor(licenseInterceptor).excludePathPatterns(licenseWhiteList);
|
||||
List<String> whiteList = new ArrayList<>();
|
||||
whiteList.add("/doc/**");
|
||||
whiteList.add("/api/login/**");
|
||||
whiteList.add("/api/wxpat/**");
|
||||
whiteList.add("/api/sms/**");
|
||||
whiteList.add("/api/register/**");
|
||||
whiteList.add("/api/userinfo/**");
|
||||
whiteList.add("/api/wechatpay/receive");
|
||||
whiteList.add("/api/alipay/receive");
|
||||
whiteList.add("/api/applet/**");
|
||||
whiteList.add("/api/wxauth/**");
|
||||
whiteList.add("/api/distribute/permission");
|
||||
whiteList.add("/api/v1/jointTraining/permission");
|
||||
whiteList.add("/api/jointTraining/permission");
|
||||
whiteList.add("/api/user/bind/wm");
|
||||
// 运行图工具
|
||||
whiteList.add("/api/rpTools/**");
|
||||
whiteList.add("/api/license/validate");
|
||||
whiteList.add("/api/license/local");
|
||||
// 微信回调接口
|
||||
whiteList.add("/api/wechatPay/receive");
|
||||
// 成都工业留言板
|
||||
whiteList.add("/api/learn/cgy/message/create");
|
||||
whiteList.add("/api/learn/cgy/{messageId}/comment");
|
||||
whiteList.add("/api/learn/{postId}/message/pagedQuery/postId");
|
||||
whiteList.add("GET /api/learn/{messageId}/comment");
|
||||
whiteList.add("/api/learn/cgy/updateMessageTime");
|
||||
// 成都工业使用记录
|
||||
whiteList.add("/api/cgy/**");
|
||||
//项目域名查询
|
||||
whiteList.add("/api/projectServer/project/{project}");
|
||||
whiteList.add("/test/simulation/**");
|
||||
whiteList.add("/api/test/**");
|
||||
whiteList.add("/api/project/viewSetting/simple/all");
|
||||
whiteList.add("/api/project/viewSetting/project/{project}");
|
||||
//旧数据处理
|
||||
whiteList.add("/api/org/oldData/handle");
|
||||
whiteList.add("/api/mapFunction/oldDataHandle");
|
||||
whiteList.add("/api/v2/paper/composition/oldData/handle");
|
||||
whiteList.add("/api/user/sync");
|
||||
whiteList.add("/dataHandle");
|
||||
|
||||
registry.addInterceptor(authenticateInterceptor).excludePathPatterns(whiteList);
|
||||
}
|
||||
registry.addInterceptor(authenticateInterceptor).excludePathPatterns(whiteList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFormatters(FormatterRegistry registry) {
|
||||
registry.addConverter(new LocalDateConverter());
|
||||
WebMvcConfigurer.super.addFormatters(registry);
|
||||
}
|
||||
@Override
|
||||
public void addFormatters(FormatterRegistry registry) {
|
||||
registry.addConverter(new LocalDateConverter());
|
||||
WebMvcConfigurer.super.addFormatters(registry);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user