hippo-core enable 添加开关.

pull/131/head
chen.ma 2 years ago
parent e11153aa12
commit 61d1f70a8f

@ -22,20 +22,25 @@ public class BootstrapCoreProperties implements BootstrapPropertiesInterface {
public static final String PREFIX = "spring.dynamic.thread-pool";
/**
* Enable dynamic thread pool.
*/
private Boolean enable = Boolean.TRUE;
/**
* Enabled banner.
*/
private Boolean banner;
private Boolean banner = Boolean.TRUE;
/***
* Enabled collect.
*/
private Boolean collect;
private Boolean collect = Boolean.TRUE;
/**
* Check state interval.
*/
private String checkStateInterval;
private Integer checkStateInterval;
/**
* Config file type.

@ -20,6 +20,7 @@ import lombok.AllArgsConstructor;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -36,6 +37,7 @@ import org.springframework.core.annotation.Order;
@AllArgsConstructor
@EnableConfigurationProperties(BootstrapCoreProperties.class)
@ImportAutoConfiguration({UtilAutoConfiguration.class})
@ConditionalOnProperty(prefix = BootstrapCoreProperties.PREFIX, value = "enable", matchIfMissing = true, havingValue = "true")
public class DynamicThreadPoolCoreAutoConfiguration {
private final BootstrapCoreProperties bootstrapCoreProperties;

Loading…
Cancel
Save