title: Spring boot change server port
body: <p>I have created Spring Maven project (using archetype maven-archetype-webapp) for web application. I need to bind on ip different from localhost and different port. I have created file "application.properties" in resources folder and added following lines:</p>
  
  <pre><code>server.port=8001
  server.address= 192.168.1.91
  </code></pre>
  
  <p>However on startup it still uses port default one 8080 and also ip is still localhost.</p>
  
  <p>My WebInitializer class is :</p>
  
  <pre><code>package guard;
  
  import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
  
  public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
  
      @Override
      protected Class&lt;?&gt;[] getRootConfigClasses() {
          return new Class[]{RootConfig.class};
      }
  
      @Override
      protected Class&lt;?&gt;[] getServletConfigClasses() {
          return new Class[]{WebConfig.class};
      }
  
      @Override
      protected String[] getServletMappings() {
          return new String[]{"*.html"};
      }
  
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>