|
|
|
@ -16,8 +16,6 @@
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.reactor;
|
|
|
|
|
|
|
|
|
|
import reactor.tools.agent.ReactorDebugAgent;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
|
import org.springframework.boot.env.EnvironmentPostProcessor;
|
|
|
|
|
import org.springframework.core.Ordered;
|
|
|
|
@ -46,7 +44,13 @@ public class DebugAgentEnvironmentPostProcessor implements EnvironmentPostProces
|
|
|
|
|
if (ClassUtils.isPresent(REACTOR_DEBUGAGENT_CLASS, null)) {
|
|
|
|
|
Boolean agentEnabled = environment.getProperty(DEBUGAGENT_ENABLED_CONFIG_KEY, Boolean.class);
|
|
|
|
|
if (agentEnabled != Boolean.FALSE) {
|
|
|
|
|
ReactorDebugAgent.init();
|
|
|
|
|
try {
|
|
|
|
|
Class<?> debugAgent = Class.forName(REACTOR_DEBUGAGENT_CLASS);
|
|
|
|
|
debugAgent.getMethod("init").invoke(null);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex) {
|
|
|
|
|
throw new RuntimeException("Failed to init Reactor's debug agent");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|