Package org.springframework.boot.actuate.endpoint

Examples of org.springframework.boot.actuate.endpoint.InfoEndpoint


    info.putAll(this.properties.infoMap());
    GitInfo gitInfo = this.properties.gitInfo();
    if (gitInfo.getBranch() != null) {
      info.put("git", gitInfo);
    }
    return new InfoEndpoint(info);
  }
View Full Code Here


  public void testInfoEndpointConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context, "info.foo:bar");
    this.context.register(EndpointAutoConfiguration.class);
    this.context.refresh();
    InfoEndpoint endpoint = this.context.getBean(InfoEndpoint.class);
    assertNotNull(endpoint);
    assertNotNull(endpoint.invoke().get("git"));
    assertEquals("bar", endpoint.invoke().get("foo"));
  }
View Full Code Here

    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
        "spring.git.properties:classpath:nonexistent");
    this.context.register(EndpointAutoConfiguration.class);
    this.context.refresh();
    InfoEndpoint endpoint = this.context.getBean(InfoEndpoint.class);
    assertNotNull(endpoint);
    assertNull(endpoint.invoke().get("git"));
  }
View Full Code Here

TOP

Related Classes of org.springframework.boot.actuate.endpoint.InfoEndpoint

Copyright © 2018 www.massapicom. 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.