diff --git a/agent/hippo4j-agent-plugin/spring-plugins/spring-plugin-common/src/main/java/cn/hippo4j/agent/plugin/spring/common/interceptor/SpringApplicationRunInterceptor.java b/agent/hippo4j-agent-plugin/spring-plugins/spring-plugin-common/src/main/java/cn/hippo4j/agent/plugin/spring/common/interceptor/SpringApplicationRunInterceptor.java deleted file mode 100644 index 0632a5c3..00000000 --- a/agent/hippo4j-agent-plugin/spring-plugins/spring-plugin-common/src/main/java/cn/hippo4j/agent/plugin/spring/common/interceptor/SpringApplicationRunInterceptor.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.agent.plugin.spring.common.interceptor; - -import cn.hippo4j.agent.core.plugin.interceptor.enhance.EnhancedInstance; -import cn.hippo4j.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor; -import cn.hippo4j.agent.core.plugin.interceptor.enhance.MethodInterceptResult; -import cn.hippo4j.agent.plugin.spring.common.support.SpringEnvironmentSupport; -import cn.hippo4j.agent.plugin.spring.common.support.SpringThreadPoolRegisterSupport; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.env.ConfigurableEnvironment; - -import java.lang.reflect.Method; - -/** - * Event publishing run listener environment prepared interceptor - */ -public class SpringApplicationRunInterceptor implements InstanceMethodsAroundInterceptor { - - private static final Logger LOGGER = LoggerFactory.getLogger(SpringApplicationRunInterceptor.class); - - @Override - public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws Throwable { - - } - - @Override - public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, Object ret) throws Throwable { - ConfigurableEnvironment environment = (ConfigurableEnvironment) allArguments[0]; - SpringEnvironmentSupport.disableNonAgentSwitch(environment); - LOGGER.info("[Hippo4j-Agent] Switch off in non-Agent mode."); - return ret; - } - - @Override - public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, Throwable t) { - - } -} diff --git a/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/config/DynamicThreadPoolAutoConfiguration.java b/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/config/DynamicThreadPoolAutoConfiguration.java index e7b7ef85..a00fe0fd 100644 --- a/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/config/DynamicThreadPoolAutoConfiguration.java +++ b/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/config/DynamicThreadPoolAutoConfiguration.java @@ -28,12 +28,9 @@ import cn.hippo4j.config.springboot.starter.support.DynamicThreadPoolAdapterRegi import cn.hippo4j.config.springboot.starter.support.DynamicThreadPoolConfigService; import cn.hippo4j.config.springboot.starter.support.DynamicThreadPoolPostProcessor; import cn.hippo4j.core.config.ApplicationContextHolder; -import cn.hippo4j.core.config.UtilAutoConfiguration; import cn.hippo4j.core.enable.MarkerConfiguration; import cn.hippo4j.core.executor.handler.DynamicThreadPoolBannerHandler; import cn.hippo4j.core.extension.initialize.Hippo4jDynamicThreadPoolInitializer; -import cn.hippo4j.message.config.MessageConfiguration; -import cn.hippo4j.springboot.starter.adapter.web.WebAdapterConfiguration; import cn.hippo4j.threadpool.alarm.api.ThreadPoolCheckAlarm; import cn.hippo4j.threadpool.alarm.handler.DefaultThreadPoolCheckAlarmHandler; import cn.hippo4j.threadpool.dynamic.mode.config.properties.BootstrapConfigProperties; @@ -45,7 +42,6 @@ import cn.hippo4j.threadpool.message.core.service.ThreadPoolSendMessageService; import cn.hippo4j.threadpool.message.core.service.WebThreadPoolConfigChangeHandler; import lombok.AllArgsConstructor; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/starters/threadpool/monitor/hippo4j-spring-boot-starter-monitor-micrometer/src/main/java/cn/hippo4j/springboot/starter/monitor/micrometer/MicrometerMonitorAutoConfiguration.java b/starters/threadpool/monitor/hippo4j-spring-boot-starter-monitor-micrometer/src/main/java/cn/hippo4j/springboot/starter/monitor/micrometer/MicrometerMonitorAutoConfiguration.java index 7b7aee3b..1eb7b70b 100644 --- a/starters/threadpool/monitor/hippo4j-spring-boot-starter-monitor-micrometer/src/main/java/cn/hippo4j/springboot/starter/monitor/micrometer/MicrometerMonitorAutoConfiguration.java +++ b/starters/threadpool/monitor/hippo4j-spring-boot-starter-monitor-micrometer/src/main/java/cn/hippo4j/springboot/starter/monitor/micrometer/MicrometerMonitorAutoConfiguration.java @@ -33,7 +33,6 @@ import org.springframework.boot.autoconfigure.AutoConfigureBefore; * Micrometer monitor auto configuration. */ @Configuration -@AutoConfigureBefore @ConditionalOnBean(MarkerConfiguration.Marker.class) @ConditionalOnExpression("'${spring.dynamic.thread-pool.monitor.collect-types:}'.contains('micrometer')") public class MicrometerMonitorAutoConfiguration {