0

I am trying to create a stand alone GRPC server but with Spring Boot so I get DI and other things that are provided by Spring Boot. What I am trying to do is implement the health check endpoint via JMX but when I run it with the following dependendices (note I commented out webflux because I don't want the webflux engine)

    runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator'
//  implementation 'org.springframework.boot:spring-boot-starter-webflux'
    implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'

My application yaml is

spring:
  main:
    banner-mode: "off"
    web-application-type: none
management:
  endpoint:
    health:
      enabled: true
  endpoints:
    jmx:
      exposure:
        include: health

When I go to jconsole locally I don't see any of the spring boot mbeans though.

I tried to spring.application.admin.enabled: true and spring.jmx.enabled: true with no luck

Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265

1 Answers1

0

Actually it was one of my attempts that just didn't start up correctly. The value to enable it is spring.jmx.enabled so the YAML stanza would be.

spring:
  main:
    banner-mode: "off"
    web-application-type: none
  jmx:
    enabled: true
management:
  endpoint:
    health:
      enabled: true
  endpoints:
    jmx:
      exposure:
        include: health
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265