feat(ops): 安保工单模块完整实现 #1

Merged
lzh merged 17 commits from feat/security-work-order into master 2026-03-15 16:44:14 +08:00
Showing only changes of commit 2a20f7a89f - Show all commits

View File

@@ -1,27 +1,30 @@
package com.viewsh.framework.web.core.filter;
import cn.hutool.core.util.StrUtil;
import com.viewsh.framework.web.config.WebProperties;
import lombok.RequiredArgsConstructor;
import org.springframework.web.filter.OncePerRequestFilter;
import jakarta.servlet.http.HttpServletRequest;
/**
* 过滤 /admin-api、/app-api 等 API 请求的过滤器
*
* @author 芋道源码
*/
@RequiredArgsConstructor
public abstract class ApiRequestFilter extends OncePerRequestFilter {
protected final WebProperties webProperties;
@Override
protected boolean shouldNotFilter(HttpServletRequest request) {
// 只过滤 API 请求的地址
String apiUri = request.getRequestURI().substring(request.getContextPath().length());
return !StrUtil.startWithAny(apiUri, webProperties.getAdminApi().getPrefix(), webProperties.getAppApi().getPrefix());
}
}
package com.viewsh.framework.web.core.filter;
import cn.hutool.core.util.StrUtil;
import com.viewsh.framework.web.config.WebProperties;
import lombok.RequiredArgsConstructor;
import org.springframework.web.filter.OncePerRequestFilter;
import jakarta.servlet.http.HttpServletRequest;
/**
* 过滤 /admin-api、/app-api、/open-api 等 API 请求的过滤器
*
* @author 芋道源码
*/
@RequiredArgsConstructor
public abstract class ApiRequestFilter extends OncePerRequestFilter {
protected final WebProperties webProperties;
@Override
protected boolean shouldNotFilter(HttpServletRequest request) {
// 只过滤 API 请求的地址
String apiUri = request.getRequestURI().substring(request.getContextPath().length());
return !StrUtil.startWithAny(apiUri,
webProperties.getAdminApi().getPrefix(),
webProperties.getAppApi().getPrefix(),
webProperties.getOpenApi().getPrefix());
}
}