Examples of ConfigurableEnvironment


Examples of org.springframework.core.env.ConfigurableEnvironment

  }

  @Test
  public void overridePidFileWithSpring() throws Exception {
    File file = this.temporaryFolder.newFile();
    ConfigurableEnvironment environment = new StandardEnvironment();
    MockPropertySource propertySource = new MockPropertySource();
    propertySource.setProperty("spring.pidfile", file.getAbsolutePath());
    environment.getPropertySources().addLast(propertySource);
    ConfigurableApplicationContext context = mock(ConfigurableApplicationContext.class);
    given(context.getEnvironment()).willReturn(environment);
    ApplicationPreparedEvent event = new ApplicationPreparedEvent(
        new SpringApplication(), new String[] {}, context);
    ApplicationPidFileWriter listener = new ApplicationPidFileWriter();
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.