Search code examples
spring-bootspring-cloudnetflix-eurekaspring-boot-admin

How to set the jolokia context path in springboot admin


  1. I set the application service management.context-path to /mgmt and Registry it to eureka server.

eureka: instance: statusPageUrlPath: ${management.context-path}/info healthCheckUrlPath: ${management.context-path}/health metadata-map: management.context-path: ${management.context-path} prefer-ip-address: true client: serviceUrl: defaultZone: http://registry:7000/eureka/

  1. when i view the JMX in admin UI(another different service, and registry in eureka server), i got some security issue. and actually i add the /mgmt/* to the white list

http.authorizeRequests() .antMatchers("/" ,"/mgmt/*","/jolokia","/jolokia/**").permitAll()

How to set the jolokia context path in springboot admin?

enter image description here


Solution

  • Oh Fk, just a mistake, change the /mgmt/* to /mgmt/, it works.

    http.authorizeRequests() .antMatchers("/" , "/mgmt/**","/jolokia","/jolokia/**").permitAll()