Package org.springframework.boot.context.web

Examples of org.springframework.boot.context.web.ServletContextApplicationContextInitializer


    }
    SpringApplicationBuilder application = new SpringApplicationBuilder();
    if (parent != null) {
      application.initializers(new ParentContextApplicationContextInitializer(parent));
    }
    application.initializers(new ServletContextApplicationContextInitializer(servletContext));
    application.contextClass(AnnotationConfigEmbeddedWebApplicationContext.class);
    application = configure(application);
    // Ensure error pages are registered
    application.sources(ErrorFilter.class);
    return (WebApplicationContext) application.run();
View Full Code Here


      WebMergedContextConfiguration webConfiguration = (WebMergedContextConfiguration) configuration;
      if (AnnotationUtils.findAnnotation(webConfiguration.getTestClass(),
          IntegrationTest.class) == null) {
        MockServletContext servletContext = new MockServletContext(
            webConfiguration.getResourceBasePath());
        initializers.add(0, new ServletContextApplicationContextInitializer(
            servletContext));
        application
            .setApplicationContextClass(GenericWebApplicationContext.class);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.boot.context.web.ServletContextApplicationContextInitializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.