feat(validation): wjy添加系统过期校验拦截器
- 新增 ValidationInterceptor 拦截器实现系统过期检查 - 配置拦截器注册,排除 /error 路径 - 实现基于 Base64期日期配置 编码的过读取 - 添加系统过期时的 JSON 格式错误响应 - 提供静态方法供外部调用检查系统状态 - 记录系统过期检查相关日志信息master
parent
5aa36a9788
commit
d51a18af8d
@ -0,0 +1,28 @@
|
|||||||
|
package com.aucma.framework.validation;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Wen JY
|
||||||
|
* @description: 系统校验拦截器配置
|
||||||
|
* @date 2025-10-09 17:14:00
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class InterceptorConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ValidationInterceptor interceptor() {
|
||||||
|
return new ValidationInterceptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
registry.addInterceptor(interceptor())
|
||||||
|
.addPathPatterns("/**")
|
||||||
|
.excludePathPatterns("/error");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue