title: How to make Javamelody use different port (Spring Boot+two HTTP ports exposed)
body: <p>I have Spring Boot web application. It exposes REST API on port 8080. It also exposes management port 8081 with Spring Boot Management endpoints (<a href="http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-monitoring.html" rel="nofollow noreferrer">http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-monitoring.html</a>).
  I do not have any custom Tomcat configuration to achieve that. I just have property <code>management.port=8081</code> in my <code>application.properties</code> file.</p>
  
  <p>I have JavaMelody configured as described in 
  <a href="https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#spring-boot-app" rel="nofollow noreferrer">https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#spring-boot-app</a>
  (I have my custom <code>JavaMelodyConfiguration</code> class, with <code>org.springframework.boot.web.servlet.FilterRegistrationBean</code> that registers <code>net.bull.javamelody.MonitoringFilter</code>).</p>
  
  <pre><code>@Bean
      public FilterRegistrationBean javaMelody() {
          final FilterRegistrationBean javaMelody = new FilterRegistrationBean();
          javaMelody.setFilter(new MonitoringFilter());
          javaMelody.setAsyncSupported(true);
          javaMelody.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC);
          javaMelody.addUrlPatterns("/*");
          return javaMelody;
      }
  </code></pre>
  
  <p>With this configuration, Javamelody is exposed on port 8080 (business port). I would like to move it to 8081(management port). How to change that?</p>
  
  <p>I use Spring Boot 1.4.2.RELEASE, javamelody 1.62.0</p>