代码扫描问题解决

This commit is contained in:
liulu
2025-01-14 17:26:50 +08:00
parent 334607a896
commit 3e1572dcad
49 changed files with 528 additions and 435 deletions
@@ -7,8 +7,10 @@ import com.sunyard.chsm.model.dto.CertDTO;
import com.sunyard.chsm.service.AppCertService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -31,6 +33,11 @@ public class AppCertController {
@Resource
private AppCertService appCertService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询应用证书列表
*
@@ -10,8 +10,10 @@ import com.sunyard.chsm.service.ApplicationService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Assert;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -35,6 +37,11 @@ public class ApplicationController {
@Resource
private ApplicationService applicationService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询应用列表
*
@@ -7,8 +7,10 @@ import com.sunyard.chsm.model.dto.CertDTO;
import com.sunyard.chsm.service.CaCertService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -32,6 +34,11 @@ public class CaController {
@Resource
private CaCertService caCertService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询CA列表
*
@@ -10,8 +10,10 @@ import com.sunyard.chsm.service.CryptoServiceService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Assert;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -38,6 +40,11 @@ public class CryptoServiceController {
@Resource
private CryptoServiceService cryptoServiceService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 查询密码服务接口分组列表
*
@@ -9,8 +9,10 @@ import com.sunyard.chsm.model.R;
import com.sunyard.chsm.service.DeviceService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -37,6 +39,11 @@ public class DeviceController {
@Resource
private DeviceService deviceService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询密码设备列表
*
@@ -6,8 +6,10 @@ import com.sunyard.chsm.dto.DeviceGroupDTO;
import com.sunyard.chsm.model.R;
import com.sunyard.chsm.service.DeviceGroupService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -30,6 +32,11 @@ public class DeviceGroupController {
@Resource
private DeviceGroupService deviceGroupService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询设备组列表
*
@@ -6,7 +6,9 @@ import com.sunyard.chsm.dto.IpWhitelistDTO;
import com.sunyard.chsm.model.R;
import com.sunyard.chsm.service.IpWhitelistService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -30,6 +32,11 @@ public class IpWhitelistController {
@Resource
private IpWhitelistService iIpWhitelistService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询设备组列表
*
@@ -10,7 +10,9 @@ import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -32,6 +34,11 @@ public class KeyInfoAsymController {
@Resource
private KeyInfoService keyInfoService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询非对称密钥列表
@@ -8,7 +8,9 @@ import com.sunyard.chsm.model.dto.KeyInfoDTO;
import com.sunyard.chsm.service.KeyInfoService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import com.sunyard.ssp.common.exception.SspwebException;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,6 +37,11 @@ public class KeyInfoController {
@Resource
private KeyInfoService keyInfoService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 获取密钥状态选项
*/
@@ -12,7 +12,9 @@ import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,6 +35,11 @@ public class KeyInfoSymController {
@Autowired
private KeyInfoService keyInfoService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询对称密钥列表
@@ -6,8 +6,10 @@ import com.sunyard.chsm.dto.KeyTemplateDTO;
import com.sunyard.chsm.model.R;
import com.sunyard.chsm.service.KeyTemplateService;
import com.sunyard.ssp.common.annotation.AuditControllerLog;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -30,6 +32,11 @@ public class KeyTemplateController {
@Resource
private KeyTemplateService keyTemplateService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 分页查询密钥模版
*
@@ -6,7 +6,9 @@ import com.sunyard.chsm.service.TmkService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.tuple.Pair;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -31,6 +33,11 @@ public class TmkController {
@Resource
private TmkService tmkService;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields("qwer");
}
/**
* 查询主密钥生成状态
*