From 989783dbb8dc67b9bafa3d51fbcf8d1e393b8aea Mon Sep 17 00:00:00 2001 From: HuangXin Date: Mon, 21 Sep 2020 16:53:39 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20Spring=20boot=20=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E5=8D=87=E7=BA=A7=E5=88=B02.3.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 36 ++++++++++--------- .../test/common/CommonEnvironment.java | 4 ++- .../test/dev/Global/InitTestEnvironment.java | 22 ++++++------ .../com/dispose/test/exec/TestCaseRun.java | 2 -- 4 files changed, 35 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 0de89494..d8ba47be 100644 --- a/pom.xml +++ b/pom.xml @@ -3,27 +3,29 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.2.9.RELEASE - - - com.dispose - phoenix_ddos_handle - 1.0.0 - phoenix_ddos_handle - Demo project for Spring Boot 1.8 Greenwich.SR3 2.1.3.Final UTF-8 + 2.3.4.RELEASE + + org.springframework.boot + spring-boot-starter-parent + 2.3.4.RELEASE + + + com.dispose + phoenix_ddos_handle + 2.0.0 + phoenix_ddos_handle + Dispose Platform org.springframework.boot spring-boot-starter-actuator + ${spring.framework.version} runtime true @@ -127,6 +129,7 @@ joda-time joda-time + 2.10.6 cn.hutool @@ -146,11 +149,6 @@ pagehelper-spring-boot-starter 1.2.9 - - com.cmcc - enc.dec - 1.3.1 - commons-codec commons-codec @@ -212,6 +210,12 @@ jasypt-spring-boot 3.0.3 + + + org.hibernate + hibernate-validator + 6.1.5.Final + diff --git a/src/test/java/com/dispose/test/common/CommonEnvironment.java b/src/test/java/com/dispose/test/common/CommonEnvironment.java index 905a2c4b..6ae90b14 100644 --- a/src/test/java/com/dispose/test/common/CommonEnvironment.java +++ b/src/test/java/com/dispose/test/common/CommonEnvironment.java @@ -7,6 +7,7 @@ import com.dispose.mapper.UserAccountMapper; import com.dispose.pojo.entity.UserAccount; import com.dispose.pojo.po.MulReturnType; import com.dispose.service.UserAccountService; +import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.springframework.test.context.ActiveProfiles; @@ -23,7 +24,8 @@ import java.util.Optional; */ @Data @Slf4j -@ActiveProfiles("test,dispose") +@EnableEncryptableProperties +@ActiveProfiles({"test", "dispose"}) public class CommonEnvironment { /** diff --git a/src/test/java/com/dispose/test/dev/Global/InitTestEnvironment.java b/src/test/java/com/dispose/test/dev/Global/InitTestEnvironment.java index f95b6daf..e89f32b4 100644 --- a/src/test/java/com/dispose/test/dev/Global/InitTestEnvironment.java +++ b/src/test/java/com/dispose/test/dev/Global/InitTestEnvironment.java @@ -7,6 +7,7 @@ import com.dispose.common.ProtoCryptoType; import com.dispose.pojo.dto.protocol.base.ProtocolRespDTO; import com.dispose.pojo.po.MulReturnType; import com.dispose.service.UserAccountService; +import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.junit.Assert; @@ -24,7 +25,8 @@ import javax.annotation.Resource; */ @Slf4j @Getter -@ActiveProfiles("test,dispose") +@EnableEncryptableProperties +@ActiveProfiles({"test", "dispose"}) public class InitTestEnvironment { /** * The constant HTTP_CONNECT_TIMEOUT. @@ -48,14 +50,6 @@ public class InitTestEnvironment { @Resource private UserAccountService userAccountService; - /** - * Init global value. - */ - @PostConstruct - public void initGlobalValue() { - DisposeConfigValue.ENABLE_UTEST_MOCK = true; - } - /** * Init virtual device. */ @@ -64,6 +58,14 @@ public class InitTestEnvironment { log.warn("Current Used Virtual Dispose Device"); } + /** + * Init global value. + */ + @PostConstruct + public void initGlobalValue() { + DisposeConfigValue.ENABLE_UTEST_MOCK = true; + } + /** * User login. * @@ -98,7 +100,7 @@ public class InitTestEnvironment { // 检查请求是否超时 if (DisposeConfigValue.CHECK_PROTO_REQUEST_TIMEOUT) { Assert.assertFalse(Math.abs(System.currentTimeMillis() - proObject.getTimeStamp()) - >= DisposeConfigValue.REQUEST_TIMEOUT_MS); + >= DisposeConfigValue.REQUEST_TIMEOUT_MS); } // 检查加密方式 diff --git a/src/test/java/com/dispose/test/exec/TestCaseRun.java b/src/test/java/com/dispose/test/exec/TestCaseRun.java index 0c002e68..4a188486 100644 --- a/src/test/java/com/dispose/test/exec/TestCaseRun.java +++ b/src/test/java/com/dispose/test/exec/TestCaseRun.java @@ -76,8 +76,6 @@ public interface TestCaseRun { Collections.addAll(tolTestCase, P2TaskStop.getTestCase()); Collections.addAll(tolTestCase, P2TaskList.getTestCase()); - - Collections.addAll(tolTestCase, ProtocolSecurity.getTestCase()); Collections.addAll(tolTestCase, CodeCoverage.getTestCase());