EnableDynamicThreadPool Controls Micrometer configuration (#1372)

dev_1.5.1
zjHe 1 year ago committed by GitHub
parent 4265c9d834
commit d930db6693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,10 +17,13 @@
package cn.hippo4j.springboot.starter.monitor.micrometer;
import cn.hippo4j.core.enable.MarkerConfiguration;
import cn.hippo4j.monitor.micrometer.AdapterThreadPoolMicrometerMonitorHandler;
import cn.hippo4j.monitor.micrometer.DynamicThreadPoolMicrometerMonitorHandler;
import cn.hippo4j.monitor.micrometer.WebThreadPoolMicrometerMonitorHandler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -28,6 +31,8 @@ import org.springframework.context.annotation.Configuration;
* Micrometer monitor auto configuration.
*/
@Configuration
@ConditionalOnBean(MarkerConfiguration.Marker.class)
@ConditionalOnProperty(prefix = "spring.dynamic.thread-pool", value = "enable", matchIfMissing = true, havingValue = "true")
@ConditionalOnExpression("'${spring.dynamic.thread-pool.monitor.collect-types:}'.contains('micrometer')")
public class MicrometerMonitorAutoConfiguration {

Loading…
Cancel
Save