Web container thread pool adaptation migration hippo-4j adapter(#308)

pull/314/head
chen.ma 3 years ago
parent 14da9298c0
commit fad9b0f944

@ -0,0 +1,85 @@
<?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-adapter</artifactId>
<version>${revision}</version>
</parent>
<artifactId>hippo4j-adapter-web</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat-embed-core.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Implementation-Title>${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Build-Time>${maven.build.timestamp}</Build-Time>
<Built-By>chen.ma</Built-By>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -15,7 +15,7 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.config.ApplicationContextHolder;
import lombok.extern.slf4j.Slf4j;
@ -29,9 +29,6 @@ import java.util.concurrent.Executor;
/**
* Abstract web thread pool service.
*
* @author chen.ma
* @date 2022/1/19 21:20
*/
@Slf4j
public abstract class AbstractWebThreadPoolService implements WebThreadPoolService, ApplicationRunner {

@ -15,8 +15,9 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.constant.ChangeThreadPoolConstants;
import cn.hippo4j.common.model.ThreadPoolBaseInfo;
import cn.hippo4j.common.model.ThreadPoolParameter;
import cn.hippo4j.common.model.ThreadPoolParameterInfo;
@ -30,12 +31,8 @@ import org.springframework.boot.web.server.WebServer;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import static cn.hippo4j.common.constant.ChangeThreadPoolConstants.CHANGE_DELIMITER;
/**
* @author : wh
* @date : 2022/2/28 16:55
* @description:
* Jetty web thread pool handler.
*/
@Slf4j
public class JettyWebThreadPoolHandler extends AbstractWebThreadPoolService {
@ -93,8 +90,8 @@ public class JettyWebThreadPoolHandler extends AbstractWebThreadPoolService {
jettyExecutor.setMinThreads(coreSize);
jettyExecutor.setMaxThreads(maxSize);
log.info("[JETTY] Changed web thread pool. corePoolSize :: [{}], maximumPoolSize :: [{}]",
String.format(CHANGE_DELIMITER, minThreads, jettyExecutor.getMinThreads()),
String.format(CHANGE_DELIMITER, maxThreads, jettyExecutor.getMaxThreads()));
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, minThreads, jettyExecutor.getMinThreads()),
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, maxThreads, jettyExecutor.getMaxThreads()));
} catch (Exception ex) {
log.error("Failed to modify the jetty thread pool parameter.", ex);
}

@ -15,14 +15,15 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.constant.ChangeThreadPoolConstants;
import cn.hippo4j.common.model.ThreadPoolBaseInfo;
import cn.hippo4j.common.model.ThreadPoolParameter;
import cn.hippo4j.common.model.ThreadPoolParameterInfo;
import cn.hippo4j.common.model.ThreadPoolRunStateInfo;
import cn.hippo4j.common.toolkit.CalculateUtil;
import cn.hippo4j.core.executor.state.AbstractThreadPoolRuntime;
import cn.hippo4j.core.toolkit.CalculateUtil;
import cn.hutool.core.date.DateUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -30,16 +31,14 @@ import org.springframework.boot.web.embedded.tomcat.TomcatWebServer;
import org.springframework.boot.web.server.WebServer;
import java.util.Date;
import java.util.concurrent.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import static cn.hippo4j.common.constant.ChangeThreadPoolConstants.CHANGE_DELIMITER;
/**
* Tomcat web thread pool handler.
*
* @author chen.ma
* @date 2022/1/19 20:57
*/
@Slf4j
@RequiredArgsConstructor
@ -167,9 +166,9 @@ public class TomcatWebThreadPoolHandler extends AbstractWebThreadPoolService {
tomcatThreadPoolExecutor.setMaximumPoolSize(threadPoolParameterInfo.maximumPoolSizeAdapt());
tomcatThreadPoolExecutor.setKeepAliveTime(threadPoolParameterInfo.getKeepAliveTime(), TimeUnit.SECONDS);
log.info("[TOMCAT] Changed web thread pool. corePoolSize :: [{}], maximumPoolSize :: [{}], keepAliveTime :: [{}]",
String.format(CHANGE_DELIMITER, originalCoreSize, threadPoolParameterInfo.corePoolSizeAdapt()),
String.format(CHANGE_DELIMITER, originalMaximumPoolSize, threadPoolParameterInfo.maximumPoolSizeAdapt()),
String.format(CHANGE_DELIMITER, originalKeepAliveTime, threadPoolParameterInfo.getKeepAliveTime()));
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, originalCoreSize, threadPoolParameterInfo.corePoolSizeAdapt()),
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, originalMaximumPoolSize, threadPoolParameterInfo.maximumPoolSizeAdapt()),
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, originalKeepAliveTime, threadPoolParameterInfo.getKeepAliveTime()));
} catch (Exception ex) {
log.error("Failed to modify the Tomcat thread pool parameter.", ex);
}

@ -15,14 +15,15 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.constant.ChangeThreadPoolConstants;
import cn.hippo4j.common.model.ThreadPoolBaseInfo;
import cn.hippo4j.common.model.ThreadPoolParameter;
import cn.hippo4j.common.model.ThreadPoolParameterInfo;
import cn.hippo4j.common.model.ThreadPoolRunStateInfo;
import cn.hippo4j.common.toolkit.CalculateUtil;
import cn.hippo4j.core.executor.DynamicThreadPoolExecutor;
import cn.hippo4j.core.toolkit.CalculateUtil;
import cn.hutool.core.date.DateUtil;
import io.undertow.Undertow;
import lombok.extern.slf4j.Slf4j;
@ -38,13 +39,8 @@ import java.util.Date;
import java.util.Objects;
import java.util.concurrent.Executor;
import static cn.hippo4j.common.constant.ChangeThreadPoolConstants.CHANGE_DELIMITER;
/**
* Undertow web thread pool handler.
*
* @author chen.ma
* @date 2022/1/19 21:19
*/
@Slf4j
public class UndertowWebThreadPoolHandler extends AbstractWebThreadPoolService {
@ -162,9 +158,9 @@ public class UndertowWebThreadPoolHandler extends AbstractWebThreadPoolService {
xnioWorker.setOption(Options.WORKER_TASK_MAX_THREADS, maxSize);
xnioWorker.setOption(Options.WORKER_TASK_KEEPALIVE, keepAliveTime);
log.info("[UNDERTOW] Changed web thread pool. corePoolSize :: [{}], maximumPoolSize :: [{}], keepAliveTime :: [{}]",
String.format(CHANGE_DELIMITER, originalCoreSize, coreSize),
String.format(CHANGE_DELIMITER, originalMaximumPoolSize, maxSize),
String.format(CHANGE_DELIMITER, originalKeepAliveTime, keepAliveTime));
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, originalCoreSize, coreSize),
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, originalMaximumPoolSize, maxSize),
String.format(ChangeThreadPoolConstants.CHANGE_DELIMITER, originalKeepAliveTime, keepAliveTime));
} catch (Exception ex) {
log.error("Failed to modify the undertow thread pool parameter.", ex);
}

@ -15,7 +15,7 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.common.web.exception.ServiceException;
@ -23,9 +23,6 @@ import lombok.extern.slf4j.Slf4j;
/**
* Web thread pool handler choose.
*
* @author chen.ma
* @date 2022/1/20 20:15
*/
@Slf4j
public class WebThreadPoolHandlerChoose {

@ -15,7 +15,7 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.model.ThreadPoolRunStateInfo;
import cn.hippo4j.common.toolkit.ByteConvertUtil;
@ -26,9 +26,6 @@ import lombok.extern.slf4j.Slf4j;
/**
* Web thread pool run state handler.
*
* @author chen.ma
* @date 2022/1/19 21:05
*/
@Slf4j
public class WebThreadPoolRunStateHandler extends AbstractThreadPoolRuntime {

@ -15,7 +15,7 @@
* limitations under the License.
*/
package cn.hippo4j.core.executor.web;
package cn.hippo4j.adapter.web;
import cn.hippo4j.common.model.ThreadPoolBaseInfo;
import cn.hippo4j.common.model.ThreadPoolParameter;
@ -26,9 +26,6 @@ import java.util.concurrent.Executor;
/**
* Web thread pool service.
*
* @author chen.ma
* @date 2022/1/19 20:51
*/
public interface WebThreadPoolService {

@ -19,5 +19,6 @@
<module>hippo4j-adapter-hystrix</module>
<module>hippo4j-adapter-spring-cloud-stream-rocketmq</module>
<module>hippo4j-adapter-spring-cloud-stream-kafka</module>
<module>hippo4j-adapter-web</module>
</modules>
</project>

@ -15,7 +15,7 @@
* limitations under the License.
*/
package cn.hippo4j.core.toolkit;
package cn.hippo4j.common.toolkit;
/**
* Calculate util.

@ -34,31 +34,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat-embed-core.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>

@ -17,14 +17,8 @@
package cn.hippo4j.core.config;
import cn.hippo4j.core.executor.state.ThreadPoolRunStateHandler;
import cn.hippo4j.core.executor.web.*;
import cn.hippo4j.core.toolkit.inet.InetUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
/**
* Web thread pool configuration.
@ -36,45 +30,4 @@ import org.springframework.core.env.ConfigurableEnvironment;
@RequiredArgsConstructor
public class WebThreadPoolConfiguration {
private static final String TOMCAT_SERVLET_WEB_SERVER_FACTORY = "tomcatServletWebServerFactory";
private static final String JETTY_SERVLET_WEB_SERVER_FACTORY = "JettyServletWebServerFactory";
private static final String UNDERTOW_SERVLET_WEB_SERVER_FACTORY = "undertowServletWebServerFactory";
private final ConfigurableEnvironment environment;
@Bean
public WebThreadPoolRunStateHandler webThreadPoolRunStateHandler() {
return new WebThreadPoolRunStateHandler();
}
@Bean
@SuppressWarnings("all")
public ThreadPoolRunStateHandler threadPoolRunStateHandler(InetUtils hippo4JInetUtils) {
return new ThreadPoolRunStateHandler(hippo4JInetUtils, environment);
}
@Bean
@ConditionalOnBean(name = TOMCAT_SERVLET_WEB_SERVER_FACTORY)
public TomcatWebThreadPoolHandler tomcatWebThreadPoolHandler(WebThreadPoolRunStateHandler webThreadPoolRunStateHandler) {
return new TomcatWebThreadPoolHandler(webThreadPoolRunStateHandler);
}
@Bean
@ConditionalOnBean(name = JETTY_SERVLET_WEB_SERVER_FACTORY)
public JettyWebThreadPoolHandler jettyWebThreadPoolHandler() {
return new JettyWebThreadPoolHandler();
}
@Bean
@ConditionalOnBean(name = UNDERTOW_SERVLET_WEB_SERVER_FACTORY)
public UndertowWebThreadPoolHandler undertowWebThreadPoolHandler() {
return new UndertowWebThreadPoolHandler();
}
@Bean
public WebThreadPoolHandlerChoose webThreadPoolServiceChoose() {
return new WebThreadPoolHandlerChoose();
}
}

@ -27,7 +27,7 @@ import cn.hippo4j.common.toolkit.StringUtil;
import cn.hippo4j.core.executor.manage.GlobalNotifyAlarmManage;
import cn.hippo4j.core.executor.manage.GlobalThreadPoolManage;
import cn.hippo4j.core.executor.support.ThreadPoolBuilder;
import cn.hippo4j.core.toolkit.CalculateUtil;
import cn.hippo4j.common.toolkit.CalculateUtil;
import cn.hippo4j.core.toolkit.IdentifyUtil;
import cn.hutool.core.util.StrUtil;
import lombok.NonNull;

@ -21,7 +21,7 @@ import cn.hippo4j.common.model.ThreadPoolRunStateInfo;
import cn.hippo4j.core.executor.DynamicThreadPoolExecutor;
import cn.hippo4j.core.executor.DynamicThreadPoolWrapper;
import cn.hippo4j.core.executor.manage.GlobalThreadPoolManage;
import cn.hippo4j.core.toolkit.CalculateUtil;
import cn.hippo4j.common.toolkit.CalculateUtil;
import cn.hutool.core.date.DateUtil;
import java.util.Date;

@ -85,6 +85,11 @@
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-adapter-base</artifactId>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-spring-boot-starter-adapter-web</artifactId>
</dependency>
</dependencies>
<build>

@ -17,11 +17,11 @@
package cn.hippo4j.core.springboot.starter.refresher.event;
import cn.hippo4j.adapter.web.WebThreadPoolHandlerChoose;
import cn.hippo4j.adapter.web.WebThreadPoolService;
import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.common.model.ThreadPoolParameter;
import cn.hippo4j.common.model.ThreadPoolParameterInfo;
import cn.hippo4j.core.executor.web.WebThreadPoolHandlerChoose;
import cn.hippo4j.core.executor.web.WebThreadPoolService;
import cn.hippo4j.core.springboot.starter.config.BootstrapCoreProperties;
import cn.hippo4j.core.springboot.starter.config.WebThreadPoolProperties;
import lombok.extern.slf4j.Slf4j;

@ -0,0 +1,50 @@
<?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-spring-boot-starter-adapter</artifactId>
<version>${revision}</version>
</parent>
<artifactId>hippo4j-spring-boot-starter-adapter-web</artifactId>
<dependencies>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-adapter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Implementation-Title>${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Build-Time>${maven.build.timestamp}</Build-Time>
<Built-By>chen.ma</Built-By>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,85 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.hippo4j.springboot.starter.adapter.web;
import cn.hippo4j.adapter.web.*;
import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.core.executor.state.ThreadPoolRunStateHandler;
import cn.hippo4j.core.toolkit.inet.InetUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
/**
* Web adapter auto configuration.
*/
@Configuration
@RequiredArgsConstructor
public class WebAdapterAutoConfiguration {
private static final String TOMCAT_SERVLET_WEB_SERVER_FACTORY = "tomcatServletWebServerFactory";
private static final String JETTY_SERVLET_WEB_SERVER_FACTORY = "JettyServletWebServerFactory";
private static final String UNDERTOW_SERVLET_WEB_SERVER_FACTORY = "undertowServletWebServerFactory";
private final ConfigurableEnvironment environment;
@Bean
@ConditionalOnMissingBean
public ApplicationContextHolder simpleApplicationContextHolder() {
return new ApplicationContextHolder();
}
@Bean
public WebThreadPoolRunStateHandler webThreadPoolRunStateHandler() {
return new WebThreadPoolRunStateHandler();
}
@Bean
@SuppressWarnings("all")
public ThreadPoolRunStateHandler threadPoolRunStateHandler(InetUtils hippo4JInetUtils) {
return new ThreadPoolRunStateHandler(hippo4JInetUtils, environment);
}
@Bean
@ConditionalOnBean(name = TOMCAT_SERVLET_WEB_SERVER_FACTORY)
public TomcatWebThreadPoolHandler tomcatWebThreadPoolHandler(WebThreadPoolRunStateHandler webThreadPoolRunStateHandler) {
return new TomcatWebThreadPoolHandler(webThreadPoolRunStateHandler);
}
@Bean
@ConditionalOnBean(name = JETTY_SERVLET_WEB_SERVER_FACTORY)
public JettyWebThreadPoolHandler jettyWebThreadPoolHandler() {
return new JettyWebThreadPoolHandler();
}
@Bean
@ConditionalOnBean(name = UNDERTOW_SERVLET_WEB_SERVER_FACTORY)
public UndertowWebThreadPoolHandler undertowWebThreadPoolHandler() {
return new UndertowWebThreadPoolHandler();
}
@Bean
public WebThreadPoolHandlerChoose webThreadPoolServiceChoose() {
return new WebThreadPoolHandlerChoose();
}
}

@ -0,0 +1 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.hippo4j.springboot.starter.adapter.web.WebAdapterAutoConfiguration

@ -21,5 +21,6 @@
<module>hippo4j-spring-boot-starter-adapter-hystrix</module>
<module>hippo4j-spring-boot-starter-adapter-spring-cloud-stream-kafka</module>
<module>hippo4j-spring-boot-starter-adapter-spring-cloud-stream-rocketmq</module>
<module>hippo4j-spring-boot-starter-adapter-web</module>
</modules>
</project>

@ -92,6 +92,10 @@
<artifactId>netty-all</artifactId>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-spring-boot-starter-adapter-web</artifactId>
</dependency>
</dependencies>
<build>

@ -18,13 +18,13 @@
package cn.hippo4j.springboot.starter.config;
import cn.hippo4j.adapter.base.ThreadPoolAdapterBeanContainer;
import cn.hippo4j.adapter.web.WebThreadPoolHandlerChoose;
import cn.hippo4j.common.api.ThreadDetailState;
import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.core.config.UtilAutoConfiguration;
import cn.hippo4j.core.config.WebThreadPoolConfiguration;
import cn.hippo4j.core.enable.MarkerConfiguration;
import cn.hippo4j.core.executor.state.ThreadPoolRunStateHandler;
import cn.hippo4j.core.executor.web.WebThreadPoolHandlerChoose;
import cn.hippo4j.core.handler.DynamicThreadPoolBannerHandler;
import cn.hippo4j.core.toolkit.IdentifyUtil;
import cn.hippo4j.core.toolkit.inet.InetUtils;
@ -33,11 +33,10 @@ import cn.hippo4j.springboot.starter.controller.WebThreadPoolController;
import cn.hippo4j.springboot.starter.controller.WebThreadPoolRunStateController;
import cn.hippo4j.springboot.starter.core.*;
import cn.hippo4j.springboot.starter.event.ApplicationContentPostProcessor;
import cn.hippo4j.springboot.starter.core.ThreadPoolAdapterRegister;
import cn.hippo4j.springboot.starter.monitor.ReportingEventExecutor;
import cn.hippo4j.springboot.starter.monitor.collect.RunTimeInfoCollector;
import cn.hippo4j.springboot.starter.monitor.send.http.HttpConnectSender;
import cn.hippo4j.springboot.starter.monitor.send.MessageSender;
import cn.hippo4j.springboot.starter.monitor.send.http.HttpConnectSender;
import cn.hippo4j.springboot.starter.remote.HttpAgent;
import cn.hippo4j.springboot.starter.remote.HttpScheduledHealthCheck;
import cn.hippo4j.springboot.starter.remote.ServerHealthCheck;
@ -54,7 +53,7 @@ import org.springframework.core.annotation.Order;
import org.springframework.core.env.ConfigurableEnvironment;
/**
* Dynamic thread-pool auto configuration.
* Dynamic thread-pool auto-configuration.
*
* @author chen.ma
* @date 2021/6/22 09:20

@ -17,12 +17,12 @@
package cn.hippo4j.springboot.starter.controller;
import cn.hippo4j.adapter.web.WebThreadPoolHandlerChoose;
import cn.hippo4j.common.model.ThreadPoolBaseInfo;
import cn.hippo4j.common.model.ThreadPoolParameterInfo;
import cn.hippo4j.common.model.ThreadPoolRunStateInfo;
import cn.hippo4j.common.web.base.Result;
import cn.hippo4j.common.web.base.Results;
import cn.hippo4j.core.executor.web.WebThreadPoolHandlerChoose;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

@ -180,12 +180,24 @@
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-adapter-web</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-adapter-spring-cloud-stream-kafka</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-spring-boot-starter-adapter-web</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>

Loading…
Cancel
Save