Examples of ApplicationStartedEvent


Examples of org.springframework.boot.context.event.ApplicationStartedEvent

  @Before
  public void init() throws SecurityException, IOException {
    LogManager.getLogManager().readConfiguration(
        JavaLoggingSystem.class.getResourceAsStream("logging.properties"));
    this.initializer.onApplicationEvent(new ApplicationStartedEvent(
        new SpringApplication(), NO_ARGS));
    new File("target/foo.log").delete();
    new File(tmpDir() + "/spring.log").delete();
  }
View Full Code Here

Examples of org.springframework.boot.context.event.ApplicationStartedEvent

  @Test
  public void parseArgsDoesntReplace() throws Exception {
    this.initializer.setSpringBootLogging(LogLevel.ERROR);
    this.initializer.setParseArgs(false);
    this.initializer.onApplicationEvent(new ApplicationStartedEvent(
        this.springApplication, new String[] { "--debug" }));
    this.initializer.initialize(this.context.getEnvironment(),
        this.context.getClassLoader());
    this.logger.debug("testatdebug");
    assertThat(this.outputCapture.toString(), not(containsString("testatdebug")));
View Full Code Here

Examples of org.springframework.boot.context.event.ApplicationStartedEvent

  @Test
  public void withNoEnvironment() throws Exception {
    File file = this.temporaryFolder.newFile();
    ApplicationPidFileWriter listener = new ApplicationPidFileWriter(file);
    listener.setTriggerEventType(ApplicationStartedEvent.class);
    listener.onApplicationEvent(new ApplicationStartedEvent(new SpringApplication(),
        new String[] {}));
    assertThat(FileCopyUtils.copyToString(new FileReader(file)), not(isEmptyString()));
  }
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.