Package org.springframework.boot.actuate.endpoint.mvc

Examples of org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping.afterPropertiesSet()


  public void beanMethodMappings() {
    StaticApplicationContext context = new StaticApplicationContext();
    EndpointHandlerMapping mapping = new EndpointHandlerMapping(
        Arrays.asList(new EndpointMvcAdapter(new DumpEndpoint())));
    mapping.setApplicationContext(new StaticApplicationContext());
    mapping.afterPropertiesSet();
    context.getDefaultListableBeanFactory().registerSingleton("mapping", mapping);
    this.endpoint.setApplicationContext(context);
    Map<String, Object> result = this.endpoint.invoke();
    assertEquals(1, result.size());
    assertTrue(result.keySet().iterator().next().contains("/dump"));
View Full Code Here


  @Test
  public void concreteMethodMappings() {
    EndpointHandlerMapping mapping = new EndpointHandlerMapping(
        Arrays.asList(new EndpointMvcAdapter(new DumpEndpoint())));
    mapping.setApplicationContext(new StaticApplicationContext());
    mapping.afterPropertiesSet();
    this.endpoint.setMethodMappings(Collections
        .<AbstractHandlerMethodMapping<?>> singletonList(mapping));
    Map<String, Object> result = this.endpoint.invoke();
    assertEquals(1, result.size());
    assertTrue(result.keySet().iterator().next().contains("/dump"));
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.