title: Spring-boot configuration
body: <p>I am trying to use a yeoman angular generator inside a Spring-boot application. I have the following project structure</p>
  
  <pre><code>/project
   -/src/main
   -- /java
   -- / resources
   --- /application.properties
   --- /public
    ---- /app
    ----- /index.html
    ----- /bower-components
    ----- /scripts
    ----- /views/**.html
    ----- /images
    ----- /styles
  </code></pre>
  
  <p>My goal is when the application loads up, index.html page would load from /project/src/main/resources/public/app/index.html and the URL should be "localhost:8080/#/". Currently, the URL looks like this localhost:8080/app/index.html. </p>
  
  <p>I tried to put the mapping in application.properties as :</p>
  
  <pre><code>server.context-path=/public/app
  </code></pre>
  
  <p>I also tried to overwrite the Application configuration by extending WebMvcConfigurerAdapter. The class is :</p>
  
  <pre><code>@Configuration
  public class ApplicationConfiguration extends WebMvcConfigurerAdapter {
  
      private static final String[] CLASSPATH_RESOURCE_LOCATIONS = {
              "classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/public/" };
  
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/**").addResourceLocations(
                  CLASSPATH_RESOURCE_LOCATIONS);
      }
      @Override
      public void addViewControllers(ViewControllerRegistry registry) {        
          registry.addViewController( "/" ).setViewName( "app/index" ); 
      }
  }
  </code></pre>
  
  <p>But looks like this isn't working either. Can anyone comment on what am I missing and how to achieve the URL as "locahost:8080/#/" even if the index.html is located at /src/main/resources/public/app. </p>
  
  <p>Note: If I keep my index.html page at /src/main/resources/public, the URL is shown as desired [locahost:8080/#/] . Any help is appreciated.</p>
  
  <p>Thanks</p>