fix boot project
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
package org.baeldung.boot.monitor.jmx;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.codahale.metrics.JmxReporter;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
|
||||
@Configuration
|
||||
public class MonitoringConfig {
|
||||
@Autowired
|
||||
private MetricRegistry registry;
|
||||
|
||||
@Bean
|
||||
public JmxReporter jmxReporter() {
|
||||
JmxReporter reporter = JmxReporter.forRegistry(registry).build();
|
||||
reporter.start();
|
||||
return reporter;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user