Skip to content

Commit

Permalink
chore(examples): add configs for Spring Boot Info endpoint to springb…
Browse files Browse the repository at this point in the history
…oot example
  • Loading branch information
tadayosi committed Apr 1, 2022
1 parent e1453cc commit adf5d0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
}
}
5 changes: 5 additions & 0 deletions examples/springboot/src/main/resources/application.properties
Expand Up @@ -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
Expand Down

0 comments on commit adf5d0a

Please sign in to comment.