Example usage for org.springframework.web.context.support GroovyWebApplicationContext GroovyWebApplicationContext

List of usage examples for org.springframework.web.context.support GroovyWebApplicationContext GroovyWebApplicationContext

Introduction

In this page you can find the example usage for org.springframework.web.context.support GroovyWebApplicationContext GroovyWebApplicationContext.

Prototype

GroovyWebApplicationContext

Source Link

Usage

From source file:com.rockagen.gnext.main.BootStrap.java

@Override
public void onStartup(ServletContext servletContext) throws ServletException {
    rootContext = new GroovyWebApplicationContext();
    rootContext.setServletContext(servletContext);
    rootContext.setConfigLocation("classpath:applicationContext.groovy");
    rootContext.refresh();/*from  w w w .  j  a v a2  s  .  c  o  m*/
    // Set init parameter
    setInitParameter(servletContext);
    // Add listener
    addListeners(servletContext);
    // Add Filter
    addFilter(servletContext);
    // Add Servlet
    addServlet(servletContext);
}