REM:
1. Spring boot 框架升级到2.3.4
This commit is contained in:
HuangXin 2020-09-21 16:53:39 +08:00
parent 8466081cac
commit 989783dbb8
4 changed files with 35 additions and 29 deletions

36
pom.xml
View File

@ -3,27 +3,29 @@
xmlns="http://maven.apache.org/POM/4.0.0" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.9.RELEASE</version>
<relativePath/>
</parent>
<groupId>com.dispose</groupId>
<artifactId>phoenix_ddos_handle</artifactId>
<version>1.0.0</version>
<name>phoenix_ddos_handle</name>
<description>Demo project for Spring Boot</description>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<spring-cloud.version>Greenwich.SR3</spring-cloud.version> <spring-cloud.version>Greenwich.SR3</spring-cloud.version>
<undertow.version>2.1.3.Final</undertow.version> <undertow.version>2.1.3.Final</undertow.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.framework.version>2.3.4.RELEASE</spring.framework.version>
</properties> </properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/>
</parent>
<groupId>com.dispose</groupId>
<artifactId>phoenix_ddos_handle</artifactId>
<version>2.0.0</version>
<name>phoenix_ddos_handle</name>
<description>Dispose Platform</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
<version>${spring.framework.version}</version>
<scope>runtime</scope> <scope>runtime</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
@ -127,6 +129,7 @@
<dependency> <dependency>
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
<version>2.10.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
@ -146,11 +149,6 @@
<artifactId>pagehelper-spring-boot-starter</artifactId> <artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.9</version> <version>1.2.9</version>
</dependency> </dependency>
<dependency>
<groupId>com.cmcc</groupId>
<artifactId>enc.dec</artifactId>
<version>1.3.1</version>
</dependency>
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
@ -212,6 +210,12 @@
<artifactId>jasypt-spring-boot</artifactId> <artifactId>jasypt-spring-boot</artifactId>
<version>3.0.3</version> <version>3.0.3</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.5.Final</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -7,6 +7,7 @@ import com.dispose.mapper.UserAccountMapper;
import com.dispose.pojo.entity.UserAccount; import com.dispose.pojo.entity.UserAccount;
import com.dispose.pojo.po.MulReturnType; import com.dispose.pojo.po.MulReturnType;
import com.dispose.service.UserAccountService; import com.dispose.service.UserAccountService;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ActiveProfiles;
@ -23,7 +24,8 @@ import java.util.Optional;
*/ */
@Data @Data
@Slf4j @Slf4j
@ActiveProfiles("test,dispose") @EnableEncryptableProperties
@ActiveProfiles({"test", "dispose"})
public class CommonEnvironment { public class CommonEnvironment {
/** /**

View File

@ -7,6 +7,7 @@ import com.dispose.common.ProtoCryptoType;
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.service.UserAccountService; import com.dispose.service.UserAccountService;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import lombok.Getter; import lombok.Getter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.junit.Assert; import org.junit.Assert;
@ -24,7 +25,8 @@ import javax.annotation.Resource;
*/ */
@Slf4j @Slf4j
@Getter @Getter
@ActiveProfiles("test,dispose") @EnableEncryptableProperties
@ActiveProfiles({"test", "dispose"})
public class InitTestEnvironment { public class InitTestEnvironment {
/** /**
* The constant HTTP_CONNECT_TIMEOUT. * The constant HTTP_CONNECT_TIMEOUT.
@ -48,14 +50,6 @@ public class InitTestEnvironment {
@Resource @Resource
private UserAccountService userAccountService; private UserAccountService userAccountService;
/**
* Init global value.
*/
@PostConstruct
public void initGlobalValue() {
DisposeConfigValue.ENABLE_UTEST_MOCK = true;
}
/** /**
* Init virtual device. * Init virtual device.
*/ */
@ -64,6 +58,14 @@ public class InitTestEnvironment {
log.warn("Current Used Virtual Dispose Device"); log.warn("Current Used Virtual Dispose Device");
} }
/**
* Init global value.
*/
@PostConstruct
public void initGlobalValue() {
DisposeConfigValue.ENABLE_UTEST_MOCK = true;
}
/** /**
* User login. * User login.
* *
@ -98,7 +100,7 @@ public class InitTestEnvironment {
// 检查请求是否超时 // 检查请求是否超时
if (DisposeConfigValue.CHECK_PROTO_REQUEST_TIMEOUT) { if (DisposeConfigValue.CHECK_PROTO_REQUEST_TIMEOUT) {
Assert.assertFalse(Math.abs(System.currentTimeMillis() - proObject.getTimeStamp()) Assert.assertFalse(Math.abs(System.currentTimeMillis() - proObject.getTimeStamp())
>= DisposeConfigValue.REQUEST_TIMEOUT_MS); >= DisposeConfigValue.REQUEST_TIMEOUT_MS);
} }
// 检查加密方式 // 检查加密方式

View File

@ -76,8 +76,6 @@ public interface TestCaseRun {
Collections.addAll(tolTestCase, P2TaskStop.getTestCase()); Collections.addAll(tolTestCase, P2TaskStop.getTestCase());
Collections.addAll(tolTestCase, P2TaskList.getTestCase()); Collections.addAll(tolTestCase, P2TaskList.getTestCase());
Collections.addAll(tolTestCase, ProtocolSecurity.getTestCase()); Collections.addAll(tolTestCase, ProtocolSecurity.getTestCase());
Collections.addAll(tolTestCase, CodeCoverage.getTestCase()); Collections.addAll(tolTestCase, CodeCoverage.getTestCase());