Examples of StandardServletEnvironment


Examples of org.springframework.web.context.support.StandardServletEnvironment

  /**
   * Create and return a new {@link StandardServletEnvironment}. Subclasses may override
   * in order to configure the environment or specialize the environment type returned.
   */
  protected ConfigurableWebEnvironment createEnvironment() {
    return new StandardServletEnvironment();
  }
View Full Code Here

Examples of org.springframework.web.context.support.StandardServletEnvironment

    public void setServletContext(ServletContext servletContext) {
        this.servletContext = servletContext;
    }

    public Environment getEnvironment() {
        return new StandardServletEnvironment();
    }
View Full Code Here

Examples of org.springframework.web.context.support.StandardServletEnvironment

    }

    @Override
    protected ConfigurableEnvironment createEnvironment() {
        GrailsApplication grailsApplication = getGrailsApplication();
        return grailsApplication == null ? new StandardServletEnvironment() : new GrailsEnvironment(grailsApplication);
    }
View Full Code Here

Examples of org.springframework.web.context.support.StandardServletEnvironment

  public void testEnvironmentOperations() {
    DispatcherServlet servlet = new DispatcherServlet();
    ConfigurableEnvironment defaultEnv = servlet.getEnvironment();
    assertThat(defaultEnv, notNullValue());
    ConfigurableEnvironment env1 = new StandardServletEnvironment();
    servlet.setEnvironment(env1); // should succeed
    assertThat(servlet.getEnvironment(), sameInstance(env1));
    try {
      servlet.setEnvironment(new DummyEnvironment());
      fail("expected IllegalArgumentException for non-configurable Environment");
View Full Code Here

Examples of org.springframework.web.context.support.StandardServletEnvironment

  /**
   * Create and return a new {@link StandardServletEnvironment}. Subclasses may override
   * in order to configure the environment or specialize the environment type returned.
   */
  protected ConfigurableEnvironment createEnvironment() {
    return new StandardServletEnvironment();
  }
View Full Code Here

Examples of org.springframework.web.context.support.StandardServletEnvironment

    prodEnv.setActiveProfiles(PROD_ENV_NAME);

    devEnv = new StandardEnvironment();
    devEnv.setActiveProfiles(DEV_ENV_NAME);

    prodWebEnv = new StandardServletEnvironment();
    prodWebEnv.setActiveProfiles(PROD_ENV_NAME);
  }
View Full Code Here

Examples of org.springframework.web.context.support.StandardServletEnvironment

  private ConfigurableEnvironment getOrCreateEnvironment() {
    if (this.environment != null) {
      return this.environment;
    }
    if (this.webEnvironment) {
      return new StandardServletEnvironment();
    }
    return new StandardEnvironment();

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.