A library that that makes the Spring Boot Actuator /actuator/heapdump
endpoint work both on IBM J9 JVM and on HotSpot JVM.
First tries to see if the app is on J9 JVM, and falls back to Spring Boot default if it doesn't seem so.
Use the Spring Boot starter
- Add the Starter dependency to POM
<dependency>
<groupId>io.github.sa1nt</groupId>
<artifactId>ibm-heapdump-spring-boot-actuator-starter</artifactId>
<version>0.8</version>
</dependency>
- Add the artifact as a dependency
<dependency>
<groupId>io.github.sa1nt</groupId>
<artifactId>ibm-heapdump-spring-boot-actuator</artifactId>
<version>0.8</version>
</dependency>
- Configure
J9HeapdumpMvcEndpoint
bean
import io.github.sa1nt.ibmheapdump.J9HeapdumpMvcEndpoint;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class IBMHeapdumpConfiguration {
@Bean
public J9HeapdumpMvcEndpoint ibmHeapdumpMvcEndpoint() {
return new J9HeapdumpMvcEndpoint();
}
}
- Clone the repo
- Run
mvn clean package