Use prometheus metrics servlet in management port of springboot
<p>I'm using prometheus metric servlet to expose my metrics, with the java client api prometheus supply. </p>

<p>I registered the servlet the same way of registering any servelt, see below:</p>

<pre><code> @Bean
public ServletRegistrationBean registerPrometheusExporterServlet(CollectorRegistry metricRegistry) {
    return new ServletRegistrationBean(new MetricsServlet(metricRegistry), "/metrics");
}
</code></pre>

<p>However, I would like to add this servlet to the management port or if it is possible that the prometheus version will replace the default /metrics service of springboot.
Can something like this can be done? and how?</p>

<p>Thanks,
Daniela</p>