hippo4j-server 添加测试项目.

pull/131/head
chen.ma 3 years ago
parent 4897eb279b
commit a9c951d025

@ -34,6 +34,7 @@ public class ThreadPoolConfig {
public DynamicThreadPoolWrapper messageCenterDynamicThreadPool() {
ThreadPoolExecutor customExecutor = ThreadPoolBuilder.builder()
.dynamicPool()
.executeTimeOut(800L)
.taskDecorator(new TaskTraceBuilderHandler())
.threadFactory(MESSAGE_CONSUME)
.build();

@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<parent>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-example</artifactId>
<version>${revision}</version>
</parent>
<artifactId>hippo4j-spring-boot-starter-example</artifactId>
<name>${project.artifactId}</name>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-example-core</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,15 @@
package cn.hippo4j.example.server;
import cn.hippo4j.core.enable.EnableDynamicThreadPool;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableDynamicThreadPool
@SpringBootApplication(scanBasePackages = "cn.hippo4j.example.core")
public class Hippo4JServerExampleApplication {
public static void main(String[] args) {
SpringApplication.run(Hippo4JServerExampleApplication.class, args);
}
}

@ -0,0 +1,19 @@
server:
port: 8088
servlet:
context-path: /example
spring:
profiles:
active: dev
application:
name: dynamic-threadpool-example
dynamic:
thread-pool:
server-addr: http://localhost:6691
namespace: prescription
item-id: dynamic-threadpool-example
username: admin
password: 123456

@ -20,10 +20,13 @@
</properties>
<modules>
<!-- 抽象测试用例 -->
<module>hippo4j-example-core</module>
<!-- 测试 Hippo4J-Server 部署方式 -->
<module>hippo4j-spring-boot-starter-example</module>
<!-- 测试 Hippo4J-Core Nacos 配置中心 -->
<module>hippo4j-core-nacos-spring-boot-starter-example</module>
<!-- 测试 Hippo4J-Core Apollo 配置中心 -->
<module>hippo4j-core-apollo-spring-boot-starter-example</module>
</modules>

Loading…
Cancel
Save