From 3acf82d3be8fdd60031188ca8aed59527894762a Mon Sep 17 00:00:00 2001 From: HuangXin Date: Fri, 9 Oct 2020 09:18:04 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E9=87=8D=E6=9E=84=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=8A=A0=E5=AF=86=E8=A7=A3=E5=AF=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=8C=85=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dispose/config/CfgFileSecurityConfigure.java | 2 +- src/main/java/com/dispose/controller/AuthController.java | 4 ++-- .../dispose/controller/DisposeDeviceManagerController.java | 4 ++-- .../java/com/dispose/controller/DisposeInfoController.java | 4 ++-- .../java/com/dispose/controller/DisposeTaskController.java | 4 ++-- .../java/com/dispose/exception/GlobalExceptionHandler.java | 2 +- .../com/dispose/interceptor/RequestProtocolSecurity.java | 2 +- .../com/dispose/interceptor/ResponseProtocolSecurity.java | 2 +- .../com/{ => dispose}/security/annotation/Decryption.java | 2 +- .../com/{ => dispose}/security/annotation/Encryption.java | 2 +- .../com/{ => dispose}/security/arithmetic/CryptoHelper.java | 2 +- .../security/configure/EncryptionPropertyResolver.java | 4 ++-- .../security/exception/SecurityProtocolException.java | 2 +- .../security/protocol/DecryptRequestProtocol.java | 2 +- .../java/com/dispose/service/ProtocolSecurityService.java | 2 +- .../dispose/service/impl/ProtocolSecurityServiceImpl.java | 6 +++--- src/test/java/com/dispose/test/dev/debug/demo.java | 2 +- .../com/dispose/test/dev/function/CryptoHelperTest.java | 2 +- 18 files changed, 25 insertions(+), 25 deletions(-) rename src/main/java/com/{ => dispose}/security/annotation/Decryption.java (89%) rename src/main/java/com/{ => dispose}/security/annotation/Encryption.java (89%) rename src/main/java/com/{ => dispose}/security/arithmetic/CryptoHelper.java (99%) rename src/main/java/com/{ => dispose}/security/configure/EncryptionPropertyResolver.java (95%) rename src/main/java/com/{ => dispose}/security/exception/SecurityProtocolException.java (92%) rename src/main/java/com/{ => dispose}/security/protocol/DecryptRequestProtocol.java (97%) diff --git a/src/main/java/com/dispose/config/CfgFileSecurityConfigure.java b/src/main/java/com/dispose/config/CfgFileSecurityConfigure.java index b00793ad..28a43d3a 100644 --- a/src/main/java/com/dispose/config/CfgFileSecurityConfigure.java +++ b/src/main/java/com/dispose/config/CfgFileSecurityConfigure.java @@ -1,6 +1,6 @@ package com.dispose.config; -import com.security.configure.EncryptionPropertyResolver; +import com.dispose.security.configure.EncryptionPropertyResolver; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/com/dispose/controller/AuthController.java b/src/main/java/com/dispose/controller/AuthController.java index d49d99d9..2bbcd137 100644 --- a/src/main/java/com/dispose/controller/AuthController.java +++ b/src/main/java/com/dispose/controller/AuthController.java @@ -8,10 +8,10 @@ import com.dispose.pojo.dto.protocol.base.BaseRespStatus; import com.dispose.pojo.dto.protocol.base.ProtocolReqDTO; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; import com.dispose.pojo.po.MulReturnType; +import com.dispose.security.annotation.Decryption; +import com.dispose.security.annotation.Encryption; import com.dispose.service.UserAccountService; import com.dispose.validation.group.ValidGroups; -import com.security.annotation.Decryption; -import com.security.annotation.Encryption; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/dispose/controller/DisposeDeviceManagerController.java b/src/main/java/com/dispose/controller/DisposeDeviceManagerController.java index 45151ed5..a7bff583 100644 --- a/src/main/java/com/dispose/controller/DisposeDeviceManagerController.java +++ b/src/main/java/com/dispose/controller/DisposeDeviceManagerController.java @@ -26,11 +26,11 @@ import com.dispose.pojo.dto.protocol.device.manager.GetDeviceRsp; import com.dispose.pojo.entity.DisposeCapacity; import com.dispose.pojo.entity.DisposeDevice; import com.dispose.pojo.po.MulReturnType; +import com.dispose.security.annotation.Decryption; +import com.dispose.security.annotation.Encryption; import com.dispose.service.DisposeDeviceManagerService; import com.dispose.validation.group.ValidGroups; import com.github.pagehelper.PageInfo; -import com.security.annotation.Decryption; -import com.security.annotation.Encryption; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/dispose/controller/DisposeInfoController.java b/src/main/java/com/dispose/controller/DisposeInfoController.java index 8048107f..e1e7b50c 100644 --- a/src/main/java/com/dispose/controller/DisposeInfoController.java +++ b/src/main/java/com/dispose/controller/DisposeInfoController.java @@ -13,12 +13,12 @@ import com.dispose.pojo.dto.protocol.device.info.GetAreaInfoRsp; import com.dispose.pojo.dto.protocol.device.info.GetDeviceInfoRsp; import com.dispose.pojo.dto.protocol.device.info.GetPlatformVerInfoRsp; import com.dispose.pojo.entity.DisposeDevice; +import com.dispose.security.annotation.Decryption; +import com.dispose.security.annotation.Encryption; import com.dispose.service.AreaCodeManagerService; import com.dispose.service.DisposeAbilityRouterService; import com.dispose.service.DisposeDeviceManagerService; import com.dispose.validation.group.ValidGroups; -import com.security.annotation.Decryption; -import com.security.annotation.Encryption; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/dispose/controller/DisposeTaskController.java b/src/main/java/com/dispose/controller/DisposeTaskController.java index 268a37f8..70211a56 100644 --- a/src/main/java/com/dispose/controller/DisposeTaskController.java +++ b/src/main/java/com/dispose/controller/DisposeTaskController.java @@ -24,12 +24,12 @@ import com.dispose.pojo.dto.protocol.task.TaskStopRsp; import com.dispose.pojo.entity.DeviceTask; import com.dispose.pojo.entity.DisposeTask; import com.dispose.pojo.po.MulReturnType; +import com.dispose.security.annotation.Decryption; +import com.dispose.security.annotation.Encryption; import com.dispose.service.DisposeTaskService; import com.dispose.service.UserAccountService; import com.dispose.validation.group.ValidGroups; import com.github.pagehelper.PageInfo; -import com.security.annotation.Decryption; -import com.security.annotation.Encryption; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/dispose/exception/GlobalExceptionHandler.java b/src/main/java/com/dispose/exception/GlobalExceptionHandler.java index ec454e48..097af812 100644 --- a/src/main/java/com/dispose/exception/GlobalExceptionHandler.java +++ b/src/main/java/com/dispose/exception/GlobalExceptionHandler.java @@ -3,7 +3,7 @@ package com.dispose.exception; import com.dispose.common.ErrorCode; import com.dispose.pojo.dto.protocol.base.BaseRespStatus; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; -import com.security.exception.SecurityProtocolException; +import com.dispose.security.exception.SecurityProtocolException; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ControllerAdvice; diff --git a/src/main/java/com/dispose/interceptor/RequestProtocolSecurity.java b/src/main/java/com/dispose/interceptor/RequestProtocolSecurity.java index d06e9a0f..d5fa282f 100644 --- a/src/main/java/com/dispose/interceptor/RequestProtocolSecurity.java +++ b/src/main/java/com/dispose/interceptor/RequestProtocolSecurity.java @@ -1,7 +1,7 @@ package com.dispose.interceptor; +import com.dispose.security.annotation.Decryption; import com.dispose.service.ProtocolSecurityService; -import com.security.annotation.Decryption; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; import org.springframework.core.MethodParameter; diff --git a/src/main/java/com/dispose/interceptor/ResponseProtocolSecurity.java b/src/main/java/com/dispose/interceptor/ResponseProtocolSecurity.java index 13256948..e5e037cf 100644 --- a/src/main/java/com/dispose/interceptor/ResponseProtocolSecurity.java +++ b/src/main/java/com/dispose/interceptor/ResponseProtocolSecurity.java @@ -4,8 +4,8 @@ import com.dispose.common.DisposeConfigValue; import com.dispose.common.ProtoCryptoType; import com.dispose.common.SecurityConfigValue; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; +import com.dispose.security.annotation.Encryption; import com.dispose.service.ProtocolSecurityService; -import com.security.annotation.Encryption; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; import org.springframework.core.MethodParameter; diff --git a/src/main/java/com/security/annotation/Decryption.java b/src/main/java/com/dispose/security/annotation/Decryption.java similarity index 89% rename from src/main/java/com/security/annotation/Decryption.java rename to src/main/java/com/dispose/security/annotation/Decryption.java index ff7e637f..4cf022ce 100644 --- a/src/main/java/com/security/annotation/Decryption.java +++ b/src/main/java/com/dispose/security/annotation/Decryption.java @@ -1,4 +1,4 @@ -package com.security.annotation; +package com.dispose.security.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/com/security/annotation/Encryption.java b/src/main/java/com/dispose/security/annotation/Encryption.java similarity index 89% rename from src/main/java/com/security/annotation/Encryption.java rename to src/main/java/com/dispose/security/annotation/Encryption.java index 0b6e38f3..fd4d63bb 100644 --- a/src/main/java/com/security/annotation/Encryption.java +++ b/src/main/java/com/dispose/security/annotation/Encryption.java @@ -1,4 +1,4 @@ -package com.security.annotation; +package com.dispose.security.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/com/security/arithmetic/CryptoHelper.java b/src/main/java/com/dispose/security/arithmetic/CryptoHelper.java similarity index 99% rename from src/main/java/com/security/arithmetic/CryptoHelper.java rename to src/main/java/com/dispose/security/arithmetic/CryptoHelper.java index 4d16f02b..02c5b55a 100644 --- a/src/main/java/com/security/arithmetic/CryptoHelper.java +++ b/src/main/java/com/dispose/security/arithmetic/CryptoHelper.java @@ -1,4 +1,4 @@ -package com.security.arithmetic; +package com.dispose.security.arithmetic; import jodd.util.Base64; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/security/configure/EncryptionPropertyResolver.java b/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java similarity index 95% rename from src/main/java/com/security/configure/EncryptionPropertyResolver.java rename to src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java index b523daa3..aa12138c 100644 --- a/src/main/java/com/security/configure/EncryptionPropertyResolver.java +++ b/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java @@ -1,6 +1,6 @@ -package com.security.configure; +package com.dispose.security.configure; -import com.security.arithmetic.CryptoHelper; +import com.dispose.security.arithmetic.CryptoHelper; import com.ulisesbocchio.jasyptspringboot.EncryptablePropertyResolver; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; diff --git a/src/main/java/com/security/exception/SecurityProtocolException.java b/src/main/java/com/dispose/security/exception/SecurityProtocolException.java similarity index 92% rename from src/main/java/com/security/exception/SecurityProtocolException.java rename to src/main/java/com/dispose/security/exception/SecurityProtocolException.java index 524001b1..051a88a3 100644 --- a/src/main/java/com/security/exception/SecurityProtocolException.java +++ b/src/main/java/com/dispose/security/exception/SecurityProtocolException.java @@ -1,4 +1,4 @@ -package com.security.exception; +package com.dispose.security.exception; import com.dispose.common.ErrorCode; import lombok.Getter; diff --git a/src/main/java/com/security/protocol/DecryptRequestProtocol.java b/src/main/java/com/dispose/security/protocol/DecryptRequestProtocol.java similarity index 97% rename from src/main/java/com/security/protocol/DecryptRequestProtocol.java rename to src/main/java/com/dispose/security/protocol/DecryptRequestProtocol.java index 8ecf718f..83a1f45d 100644 --- a/src/main/java/com/security/protocol/DecryptRequestProtocol.java +++ b/src/main/java/com/dispose/security/protocol/DecryptRequestProtocol.java @@ -1,4 +1,4 @@ -package com.security.protocol; +package com.dispose.security.protocol; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; diff --git a/src/main/java/com/dispose/service/ProtocolSecurityService.java b/src/main/java/com/dispose/service/ProtocolSecurityService.java index 24d62f40..ece960bf 100644 --- a/src/main/java/com/dispose/service/ProtocolSecurityService.java +++ b/src/main/java/com/dispose/service/ProtocolSecurityService.java @@ -1,8 +1,8 @@ package com.dispose.service; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; +import com.dispose.security.protocol.DecryptRequestProtocol; import com.fasterxml.jackson.core.JsonProcessingException; -import com.security.protocol.DecryptRequestProtocol; import org.springframework.http.HttpInputMessage; import java.io.IOException; diff --git a/src/main/java/com/dispose/service/impl/ProtocolSecurityServiceImpl.java b/src/main/java/com/dispose/service/impl/ProtocolSecurityServiceImpl.java index ec28b3c2..91ef78ce 100644 --- a/src/main/java/com/dispose/service/impl/ProtocolSecurityServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/ProtocolSecurityServiceImpl.java @@ -6,14 +6,14 @@ import com.dispose.common.ProtoCryptoType; import com.dispose.common.SecurityConfigValue; import com.dispose.pojo.dto.protocol.base.ProtocolReqDTO; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; +import com.dispose.security.arithmetic.CryptoHelper; +import com.dispose.security.exception.SecurityProtocolException; +import com.dispose.security.protocol.DecryptRequestProtocol; import com.dispose.service.ProtocolSecurityService; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.security.arithmetic.CryptoHelper; -import com.security.exception.SecurityProtocolException; -import com.security.protocol.DecryptRequestProtocol; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.springframework.http.HttpInputMessage; diff --git a/src/test/java/com/dispose/test/dev/debug/demo.java b/src/test/java/com/dispose/test/dev/debug/demo.java index a1ad9d1e..52be3a1e 100644 --- a/src/test/java/com/dispose/test/dev/debug/demo.java +++ b/src/test/java/com/dispose/test/dev/debug/demo.java @@ -9,9 +9,9 @@ import com.dispose.common.HttpType; import com.dispose.common.ObjectStatus; import com.dispose.common.PrivacyHelper; import com.dispose.pojo.entity.DisposeDevice; +import com.dispose.security.arithmetic.CryptoHelper; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.security.arithmetic.CryptoHelper; import inet.ipaddr.IPAddress; import inet.ipaddr.IPAddressString; import lombok.extern.slf4j.Slf4j; diff --git a/src/test/java/com/dispose/test/dev/function/CryptoHelperTest.java b/src/test/java/com/dispose/test/dev/function/CryptoHelperTest.java index 73959f88..d750920f 100644 --- a/src/test/java/com/dispose/test/dev/function/CryptoHelperTest.java +++ b/src/test/java/com/dispose/test/dev/function/CryptoHelperTest.java @@ -1,6 +1,6 @@ package com.dispose.test.dev.function; -import com.security.arithmetic.CryptoHelper; +import com.dispose.security.arithmetic.CryptoHelper; import lombok.extern.slf4j.Slf4j; import org.junit.Assert; import org.junit.Test;