diff --git a/examples/springboot/src/main/java/io/hawt/example/spring/boot/SampleSpringBootService.java b/examples/springboot/src/main/java/io/hawt/example/spring/boot/SampleSpringBootService.java index 4ea2056918..0628461b81 100644 --- a/examples/springboot/src/main/java/io/hawt/example/spring/boot/SampleSpringBootService.java +++ b/examples/springboot/src/main/java/io/hawt/example/spring/boot/SampleSpringBootService.java @@ -3,6 +3,8 @@ import io.hawt.config.ConfigFacade; import io.hawt.springboot.HawtioPlugin; import org.springframework.boot.SpringApplication; +import org.springframework.boot.actuate.trace.http.HttpTraceRepository; +import org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @@ -31,4 +33,12 @@ public HawtioPlugin samplePlugin() { public ConfigFacade configFacade() { return ConfigFacade.getSingleton(); } + + /** + * Enable HTTP tracing for Spring Boot + */ + @Bean + public HttpTraceRepository htttpTraceRepository() { + return new InMemoryHttpTraceRepository(); + } } diff --git a/examples/springboot/src/main/resources/application.properties b/examples/springboot/src/main/resources/application.properties index 60b4b0cdf4..ab94c3a690 100644 --- a/examples/springboot/src/main/resources/application.properties +++ b/examples/springboot/src/main/resources/application.properties @@ -3,6 +3,11 @@ management.server.port=10001 management.endpoints.web.exposure.include=hawtio,jolokia +# Information for Spring Boot Info endpoint +management.info.env.enabled=true +management.info.java.enabled=true +info.app.name=Hawtio Spring Boot Sample App + spring.jmx.enabled=true logging.level.io.hawt=INFO