chore(v0.11): 全路径纳入版本库与走查整改

- .gitignore:显式放行全部 maven-*、scripts、dev-support、frontend、反1、artifacts、历史导出目录
- 新增跟踪:device-manager/device-sdk/legacy-public、davinci-manager、cwos-*、cwos-resource 等源码与附属资源
- davinci FileStorageManagerImpl:Feign Response 关闭、绝对 URL 拉流 SSRF 校验(协议/主机/解析地址)
- davinci OuterCallFeignClient:补充契约说明
- cwos-common-aks AksConstant:final 类 + 私有构造防误实例化
- device-manager DeviceConstant:沿用 DEFAULT_APPLICATIONID 拼写修正

Made-with: Cursor

Former-commit-id: 0a34c76a82
This commit is contained in:
反编译工作区
2026-04-24 23:54:05 +08:00
parent de6245a492
commit 27c3949045
3193 changed files with 227339 additions and 1 deletions
@@ -0,0 +1,127 @@
/* */ package cn.cloudwalk.service.aop;
/* */
/* */ import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate;
/* */ import cn.cloudwalk.cloud.result.CloudwalkResult;
/* */ import java.lang.reflect.Method;
/* */ import java.util.Iterator;
/* */ import java.util.Set;
/* */ import javax.validation.ConstraintViolation;
/* */ import javax.validation.Validator;
/* */ import javax.validation.groups.Default;
/* */ import org.aspectj.lang.ProceedingJoinPoint;
/* */ import org.aspectj.lang.annotation.Around;
/* */ import org.aspectj.lang.annotation.Aspect;
/* */ import org.aspectj.lang.annotation.Pointcut;
/* */ import org.aspectj.lang.reflect.MethodSignature;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.context.MessageSource;
/* */ import org.springframework.context.i18n.LocaleContextHolder;
/* */ import org.springframework.core.annotation.Order;
/* */ import org.springframework.stereotype.Component;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Aspect
/* */ @Order(-100)
/* */ @Component
/* */ public class CloudwalkParamsValidateAspect
/* */ {
/* 43 */ private final Logger logger = LoggerFactory.getLogger(getClass());
/* */
/* */
/* */
/* */
/* */
/* */ @Autowired
/* */ private Validator validator;
/* */
/* */
/* */
/* */
/* */
/* */ @Autowired
/* */ private MessageSource messageSource;
/* */
/* */
/* */
/* */
/* */
/* */ public String getMessage(String code) {
/* 64 */ return this.messageSource.getMessage(code, null, LocaleContextHolder.getLocale());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Pointcut("@annotation(cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate)")
/* */ public void validatePointcat() {}
/* */
/* */
/* */
/* */
/* */
/* */ @Around("validatePointcat()")
/* */ public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
/* 80 */ MethodSignature methodSignature = (MethodSignature)joinPoint.getSignature();
/* 81 */ Method targetMethod = joinPoint.getTarget().getClass().getMethod(methodSignature
/* 82 */ .getName(), methodSignature.getParameterTypes());
/* */
/* 84 */ this.logger.debug("正在进行对类{}中方法{}进行参数检查开始", joinPoint.getTarget().getClass().getName(), targetMethod.getName());
/* */
/* */
/* 87 */ CloudwalkParamsValidate paramsValidate = targetMethod.<CloudwalkParamsValidate>getAnnotation(CloudwalkParamsValidate.class);
/* 88 */ if (paramsValidate == null) {
/* 89 */ return joinPoint.proceed();
/* */ }
/* */
/* */
/* 93 */ int[] needCheckParamIndexs = paramsValidate.argsIndexs();
/* 94 */ if (needCheckParamIndexs == null) {
/* 95 */ return joinPoint.proceed();
/* */ }
/* */
/* */
/* 99 */ Class<?>[] groupsClazz = paramsValidate.groups();
/* 100 */ if (groupsClazz == null) {
/* 101 */ groupsClazz = new Class[] { Default.class };
/* */ }
/* */
/* 104 */ Object[] args = joinPoint.getArgs();
/* 105 */ for (int index : needCheckParamIndexs) {
/* 106 */ Object arg = args[index];
/* */
/* 108 */ Set<ConstraintViolation<Object>> constraintViolationSet = this.validator.validate(arg, groupsClazz);
/* 109 */ if (constraintViolationSet != null && constraintViolationSet.size() > 0) {
/* 110 */ Iterator<ConstraintViolation<Object>> iterator = constraintViolationSet.iterator(); if (iterator.hasNext()) { ConstraintViolation<Object> constraintViolation = iterator.next();
/* 111 */ String code = constraintViolation.getMessage();
/* 112 */ return CloudwalkResult.fail(code, getMessage(code)); }
/* */
/* */ }
/* */ }
/* */
/* 117 */ this.logger.debug("正在进行对类{}中方法{}进行参数检查通过", joinPoint.getTarget().getClass().getName(), targetMethod.getName());
/* */
/* 119 */ return joinPoint.proceed();
/* */ }
/* */ }
/* Location: D:\星中心\cw-elevator-application-V1.0.0.20211103\cw-elevator-application-V1.0.0.20211103\lib\cloudwalk-common-service-3.7.2-Brussels-SRX.jar!\cn\cloudwalk\service\aop\CloudwalkParamsValidateAspect.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 1.1.3
*/
@@ -0,0 +1,54 @@
/* */ package cn.cloudwalk.service.config;
/* */
/* */ import javax.validation.Validation;
/* */ import javax.validation.Validator;
/* */ import javax.validation.ValidatorFactory;
/* */ import org.hibernate.validator.HibernateValidator;
/* */ import org.hibernate.validator.HibernateValidatorConfiguration;
/* */ import org.springframework.context.annotation.Bean;
/* */ import org.springframework.context.annotation.Configuration;
/* */ import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Configuration
/* */ public class ValidatorConfig
/* */ {
/* */ @Bean
/* */ public Validator validator() {
/* 33 */ ValidatorFactory validatorFactory = ((HibernateValidatorConfiguration)Validation.byProvider(HibernateValidator.class).configure()).failFast(true).buildValidatorFactory();
/* */
/* 35 */ return validatorFactory.getValidator();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Bean
/* */ public MethodValidationPostProcessor methodValidationPostProcessor() {
/* 44 */ MethodValidationPostProcessor postProcessor = new MethodValidationPostProcessor();
/* 45 */ postProcessor.setValidator(validator());
/* 46 */ return postProcessor;
/* */ }
/* */ }
/* Location: D:\星中心\cw-elevator-application-V1.0.0.20211103\cw-elevator-application-V1.0.0.20211103\lib\cloudwalk-common-service-3.7.2-Brussels-SRX.jar!\cn\cloudwalk\service\config\ValidatorConfig.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 1.1.3
*/