Examples of acceptsProfiles()


Examples of org.springframework.core.env.ConfigurableEnvironment.acceptsProfiles()

    application.setWebEnvironment(false);
    application.setAdditionalProfiles("foo");
    ConfigurableEnvironment environment = new StandardEnvironment();
    application.setEnvironment(environment);
    application.run();
    assertTrue(environment.acceptsProfiles("foo"));
  }

  @Test
  public void addProfilesOrder() throws Exception {
    SpringApplication application = new SpringApplication(ExampleConfig.class);
View Full Code Here

Examples of org.springframework.core.env.Environment.acceptsProfiles()

    @Test
    public void noProfileSpecified() {
        // activateProfiles(...);
        Environment env = runApp().getEnvironment();
        assertThat(env.acceptsProfiles(env.getDefaultProfiles()), is(true));
        assertThat(env.acceptsProfiles(CLOUDFOUNDRY), is(false));
        assertThat(env.acceptsProfiles(STANDALONE), is(true));
    }

    @After
View Full Code Here

Examples of org.springframework.core.env.Environment.acceptsProfiles()

    @Test
    public void noProfileSpecified() {
        // activateProfiles(...);
        Environment env = runApp().getEnvironment();
        assertThat(env.acceptsProfiles(env.getDefaultProfiles()), is(true));
        assertThat(env.acceptsProfiles(CLOUDFOUNDRY), is(false));
        assertThat(env.acceptsProfiles(STANDALONE), is(true));
    }

    @After
    public void clearProperty() {
View Full Code Here

Examples of org.springframework.core.env.Environment.acceptsProfiles()

    public void noProfileSpecified() {
        // activateProfiles(...);
        Environment env = runApp().getEnvironment();
        assertThat(env.acceptsProfiles(env.getDefaultProfiles()), is(true));
        assertThat(env.acceptsProfiles(CLOUDFOUNDRY), is(false));
        assertThat(env.acceptsProfiles(STANDALONE), is(true));
    }

    @After
    public void clearProperty() {
        System.clearProperty(ACTIVE_PROFILES_PROPERTY_NAME);
View Full Code Here

Examples of org.springframework.core.env.Environment.acceptsProfiles()

        springSecurityFilter.setAsyncSupported(true);

        initAtmosphereServlet(servletContext);

        Environment env = rootContext.getBean(Environment.class);
        if (env.acceptsProfiles(Constants.SPRING_PROFILE_METRICS)) {
            initMetricsServlet(servletContext, disps, dispatcherServlet);
            springSecurityFilter.addMappingForServletNames(disps, true, "dispatcher", "atmosphereServlet", "metricsAdminServlet");
        } else {
            springSecurityFilter.addMappingForServletNames(disps, true, "dispatcher", "atmosphereServlet");
        }
View Full Code Here

Examples of org.springframework.core.env.StandardEnvironment.acceptsProfiles()

    application.setWebEnvironment(false);
    application.setAdditionalProfiles("foo");
    ConfigurableEnvironment environment = new StandardEnvironment();
    application.setEnvironment(environment);
    application.run();
    assertTrue(environment.acceptsProfiles("foo"));
  }

  @Test
  public void addProfilesOrder() throws Exception {
    SpringApplication application = new SpringApplication(ExampleConfig.class);
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.