How to correctly set management.context-path for spring boot admin client under eureka discovery environment?
<p>I am setting up the spring boot admin using spring cloud. Now I have set up a stand alone eureka server and one spring boot admin and some spring boot apps as admin clients. If I don't set management.context-path for all the clients, everything works fine. But Now I need to monitor all clients(some with no <code>management.context-path</code>, some with different <code>management.context-path</code>s). I know that I should use the meta-data to achieve this, but after reading the relative docs, I still could get this done. Here are my configurations on client and admin sides.</p>

<p><strong>Client side:</strong></p>

<pre><code>spring:
  application:
    instance_id: user
    name: microservice-provider-user
management:
  context-path: '/mgmt'
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
  instance:
    preferIpAddress: false
    statusPageUrlPath: ${management.context-path}${endpoints.info.path:/info}
    healthCheckUrlPath: ${management.context-path}${endpoints.health.path:/health}
    metadata-map:
      instanceId:
${spring.application.name}:${spring.application.instance_id:${random.value}}
</code></pre>

<p><strong>Admin side:</strong></p>

<pre><code>spring:
  application:
    name: wahaha-admin
  boot:
    admin:
      routes:
        endpoints: env,metrics,trace,dump,jolokia,info,configprops,trace,logfile,refresh,flyway,liquibase,heapdump,hystrix.stream,turbine.stream

      url: http://${HOST_NAME:localhost}:${server.port}
      discovery:
        converter.management-context-path: '/mgmt'
</code></pre>

<p><strong>Questions:</strong></p>

<ol>
<li>I set the <code>spring.boot.admin.discovery.converter.management-context-path</code> to be <code>/mgmt</code>, the value is the same as the client side and this only works fine if I set all the client apps with the same value, and this is impossible. How should I do to support different <code>management.context-path</code>?</li>
</ol>

<blockquote>
  <p>PS: I did all of these on my local desktop not on any public cloud,
  and will move to the product env later(still not using public cloud).</p>
</blockquote>