REM:
1. 重构协议加密解密功能包路径
This commit is contained in:
HuangXin 2020-10-09 09:18:04 +08:00
parent bcc1a8b88f
commit 3acf82d3be
18 changed files with 25 additions and 25 deletions

View File

@ -1,6 +1,6 @@
package com.dispose.config; package com.dispose.config;
import com.security.configure.EncryptionPropertyResolver; import com.dispose.security.configure.EncryptionPropertyResolver;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -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.ProtocolReqDTO;
import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO;
import com.dispose.pojo.po.MulReturnType; 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.service.UserAccountService;
import com.dispose.validation.group.ValidGroups; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -26,11 +26,11 @@ import com.dispose.pojo.dto.protocol.device.manager.GetDeviceRsp;
import com.dispose.pojo.entity.DisposeCapacity; import com.dispose.pojo.entity.DisposeCapacity;
import com.dispose.pojo.entity.DisposeDevice; import com.dispose.pojo.entity.DisposeDevice;
import com.dispose.pojo.po.MulReturnType; 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.service.DisposeDeviceManagerService;
import com.dispose.validation.group.ValidGroups; import com.dispose.validation.group.ValidGroups;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.security.annotation.Decryption;
import com.security.annotation.Encryption;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -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.GetDeviceInfoRsp;
import com.dispose.pojo.dto.protocol.device.info.GetPlatformVerInfoRsp; import com.dispose.pojo.dto.protocol.device.info.GetPlatformVerInfoRsp;
import com.dispose.pojo.entity.DisposeDevice; 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.AreaCodeManagerService;
import com.dispose.service.DisposeAbilityRouterService; import com.dispose.service.DisposeAbilityRouterService;
import com.dispose.service.DisposeDeviceManagerService; import com.dispose.service.DisposeDeviceManagerService;
import com.dispose.validation.group.ValidGroups; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -24,12 +24,12 @@ import com.dispose.pojo.dto.protocol.task.TaskStopRsp;
import com.dispose.pojo.entity.DeviceTask; import com.dispose.pojo.entity.DeviceTask;
import com.dispose.pojo.entity.DisposeTask; import com.dispose.pojo.entity.DisposeTask;
import com.dispose.pojo.po.MulReturnType; 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.DisposeTaskService;
import com.dispose.service.UserAccountService; import com.dispose.service.UserAccountService;
import com.dispose.validation.group.ValidGroups; import com.dispose.validation.group.ValidGroups;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.security.annotation.Decryption;
import com.security.annotation.Encryption;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -3,7 +3,7 @@ package com.dispose.exception;
import com.dispose.common.ErrorCode; import com.dispose.common.ErrorCode;
import com.dispose.pojo.dto.protocol.base.BaseRespStatus; import com.dispose.pojo.dto.protocol.base.BaseRespStatus;
import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; 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 lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;

View File

@ -1,7 +1,7 @@
package com.dispose.interceptor; package com.dispose.interceptor;
import com.dispose.security.annotation.Decryption;
import com.dispose.service.ProtocolSecurityService; import com.dispose.service.ProtocolSecurityService;
import com.security.annotation.Decryption;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.core.MethodParameter; import org.springframework.core.MethodParameter;

View File

@ -4,8 +4,8 @@ import com.dispose.common.DisposeConfigValue;
import com.dispose.common.ProtoCryptoType; import com.dispose.common.ProtoCryptoType;
import com.dispose.common.SecurityConfigValue; import com.dispose.common.SecurityConfigValue;
import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO;
import com.dispose.security.annotation.Encryption;
import com.dispose.service.ProtocolSecurityService; import com.dispose.service.ProtocolSecurityService;
import com.security.annotation.Encryption;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.core.MethodParameter; import org.springframework.core.MethodParameter;

View File

@ -1,4 +1,4 @@
package com.security.annotation; package com.dispose.security.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -1,4 +1,4 @@
package com.security.annotation; package com.dispose.security.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -1,4 +1,4 @@
package com.security.arithmetic; package com.dispose.security.arithmetic;
import jodd.util.Base64; import jodd.util.Base64;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -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 com.ulisesbocchio.jasyptspringboot.EncryptablePropertyResolver;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;

View File

@ -1,4 +1,4 @@
package com.security.exception; package com.dispose.security.exception;
import com.dispose.common.ErrorCode; import com.dispose.common.ErrorCode;
import lombok.Getter; import lombok.Getter;

View File

@ -1,4 +1,4 @@
package com.security.protocol; package com.dispose.security.protocol;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;

View File

@ -1,8 +1,8 @@
package com.dispose.service; package com.dispose.service;
import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO;
import com.dispose.security.protocol.DecryptRequestProtocol;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.security.protocol.DecryptRequestProtocol;
import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpInputMessage;
import java.io.IOException; import java.io.IOException;

View File

@ -6,14 +6,14 @@ import com.dispose.common.ProtoCryptoType;
import com.dispose.common.SecurityConfigValue; import com.dispose.common.SecurityConfigValue;
import com.dispose.pojo.dto.protocol.base.ProtocolReqDTO; import com.dispose.pojo.dto.protocol.base.ProtocolReqDTO;
import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; 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.dispose.service.ProtocolSecurityService;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper; 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 lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpInputMessage;

View File

@ -9,9 +9,9 @@ import com.dispose.common.HttpType;
import com.dispose.common.ObjectStatus; import com.dispose.common.ObjectStatus;
import com.dispose.common.PrivacyHelper; import com.dispose.common.PrivacyHelper;
import com.dispose.pojo.entity.DisposeDevice; import com.dispose.pojo.entity.DisposeDevice;
import com.dispose.security.arithmetic.CryptoHelper;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.security.arithmetic.CryptoHelper;
import inet.ipaddr.IPAddress; import inet.ipaddr.IPAddress;
import inet.ipaddr.IPAddressString; import inet.ipaddr.IPAddressString;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -1,6 +1,6 @@
package com.dispose.test.dev.function; package com.dispose.test.dev.function;
import com.security.arithmetic.CryptoHelper; import com.dispose.security.arithmetic.CryptoHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;