调整暴露接口

master
guochaojie 3 months ago
parent 97b669e1ac
commit 19d9bb93d8

@ -40,21 +40,28 @@ public class WebMvcConfig implements WebMvcConfigurer {
// 全局忽略路径
private static List<String> globalExcludePaths = Arrays.asList(
"/error",
"/favicon.ico",
"/v2/**",
"/v3/**",
"/swagger-resources/**",
"/webjars/**",
"/static/**",
"/upload/**",
"/qrcode/**.txt",
"/wx/**",//微信消息推送验证
"/wx-message/**",//微信消息推送验证
"/webSocketServer/**",//socket通信
"/doc.html",
"/api/delivery-order/**",
"/api/clean-order/**"
"/error",
"/favicon.ico",
"/v2/**",
"/v3/**",
"/swagger-resources/**",
"/webjars/**",
"/static/**",
"/upload/**",
"/qrcode/**.txt",
"/wx/**",//微信消息推送验证
// "/wx-message/**",//微信消息推送验证
"/webSocketServer/**",//socket通信
"/doc.html",
//设备柜接口
"/device/conf",//获取配置
"/device/login",//手机号登录
"/device/event",//事件上报
"/device/weight",//上传实时重量
"/device/clean",//上传清运单
"/device/delivery",//上传投递单
"/device/controlAuth",//上传权限信息
"/device/uploadImage"//上传抓拍
);
/**
@ -90,9 +97,9 @@ public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
// 静态资源访问路径和存放路径配置
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/","classpath:/public/");
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/", "classpath:/public/");
// swagger访问配置
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/","classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/", "classpath:/META-INF/resources/webjars/");
// 定义资源访问路径
registry.addResourceHandler("/upload/**").addResourceLocations("file:" + UPLOAD_PATH);
// 定义二维码相关的资源访问路径
@ -179,7 +186,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
}
/**
* springboot2.6.xknife4j
*
@ -214,9 +220,10 @@ public class WebMvcConfig implements WebMvcConfigurer {
/**
* shouldRegisterLinksMapping
*
* @param webEndpointProperties webEndpointProperties
* @param environment environment
* @param basePath /
* @param environment environment
* @param basePath /
* @return boolean
*/
private boolean shouldRegisterLinksMapping(WebEndpointProperties webEndpointProperties,

Loading…
Cancel
Save