title: What does spring-boot-starter-parent exactly do in pom file?
body: <p>I'm developing a project which is not Spring boot but also spring mvc. I mean I don't have this class for example in my project:</p>
  
  <pre><code>@SpringBootApplication
  public class Application extends SpringBootServletInitializer {
  
      public static void main(String[] args) {           
        SpringApplication.run(Application.class, args);
      }
  </code></pre>
  
  <p>I have these three classes for configuration file of spring mvc:</p>
  
  <pre><code>@Import(WebSocketConfig.class)
  @Configuration
  @EnableWebMvc
  @ComponentScan(basePackages = "......")
  
  public class MainConfiguration extends WebMvcConfigurerAdapter {
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/Content/**")
                  .addResourceLocations("/Content/");
          registry.addResourceHandler("/Scripts/**")
                  .addResourceLocations("/Scripts/");
  
  
      }
  
      @Bean
      public InternalResourceViewResolver viewResolver() {
          InternalResourceViewResolver viewResolver
                  = new InternalResourceViewResolver();
          viewResolver.setPrefix("/");
          viewResolver.setSuffix(".jsp");
          return viewResolver;
      }
  
  }
  </code></pre>
  
  <p>Second:</p>
  
  <pre><code>public class MainInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
      public static HashMap&lt;String, String&gt; response_code = new HashMap&lt;String, String&gt;();
  
  
      @Override
      protected Class&lt;?&gt;[] getRootConfigClasses() {
          return new Class[] { MainConfiguration.class,
          WebSocketConfig.class};
      }
  
      @Override
      protected Class&lt;?&gt;[] getServletConfigClasses() {
          return null;
      }
  
      @Override
      protected String[] getServletMappings() {
          return new String[] { "/" };
      }
  
      @Override
      public void onStartup(ServletContext servletContext) throws ServletException {
          super.onStartup(servletContext);
          Security.addProvider(new BouncyCastleProvider());
          servletContext.addListener(new MainContextListener());
          System.out.println("MainInitializer.onStartup()");
  }}
  </code></pre>
  
  <p>Third, </p>
  
  <pre><code>public class MainContextListener implements ServletContextListener {
  
      public void contextInitialized(ServletContextEvent servletContextEvent) {
          System.out.println("Context Initialized");
          Security.addProvider(new BouncyCastleProvider());
      }
  
      public void contextDestroyed(ServletContextEvent servletContextEvent) {
          System.out.println("Shutting down!");
      }
  }
  </code></pre>
  
  <p>There is a controller and jsp file and I've configured it to run on tomcat webserver, something is strange for me is that when I add this snippet of code to my pom, index.jsp will appear in browser exactly but when I remove it , it gives 404 not found url for my controller. why is it that even my project is not a spring boot project need spring boot starter parent? I thought below code is related to spring boot and since my project is not spring boot but spring mvc, doesn't need it. but it has problem without this code added in pom:</p>
  
  <pre><code>&lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.5.1.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  </code></pre>