@@ -0,0 +1,835 @@
+package net.viralpatel.spring.config;%0A%0Aimport javax.servlet.ServletContext;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.ServletRegistration;%0A%0Aimport org.springframework.web.WebApplicationInitializer;%0Aimport org.springframework.web.context.support.AnnotationConfigWebApplicationContext;%0Aimport org.springframework.web.servlet.DispatcherServlet;%0A%0Apublic class AppInitializer implements WebApplicationInitializer %7B%0A%0A%09public void onStartup(ServletContext container) throws ServletException %7B%0A%0A%09%09AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();%0A%09%09ctx.register(AppConfig.class);%0A%09%09ctx.setServletContext(container);%0A%0A%09%09ServletRegistration.Dynamic servlet = container.addServlet(%22dispatcher%22, new DispatcherServlet(ctx));%0A%0A%09%09servlet.setLoadOnStartup(1);%0A%09%09servlet.addMapping(%22/%22);%0A%09%7D%0A%0A%7D%0A

Create AppInitializer.java