Java 类org.springframework.boot.actuate.trace.InMemoryTraceRepository 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TraceRepositoryAutoConfigurationTests.java   
@Test
public void configuresInMemoryTraceRepository() throws Exception {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
            TraceRepositoryAutoConfiguration.class);
    assertThat(context.getBean(InMemoryTraceRepository.class)).isNotNull();
    context.close();
}
项目:spring-boot-concourse    文件:TraceRepositoryAutoConfigurationTests.java   
@Test
public void configuresInMemoryTraceRepository() throws Exception {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
            TraceRepositoryAutoConfiguration.class);
    assertThat(context.getBean(InMemoryTraceRepository.class)).isNotNull();
    context.close();
}
项目:spring-boot-concourse    文件:TraceRepositoryAutoConfigurationTests.java   
@Test
public void skipsIfRepositoryExists() throws Exception {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
            Config.class, TraceRepositoryAutoConfiguration.class);
    assertThat(context.getBeansOfType(InMemoryTraceRepository.class)).isEmpty();
    assertThat(context.getBeansOfType(TraceRepository.class)).hasSize(1);
    context.close();
}
项目:contestparser    文件:TraceRepositoryAutoConfigurationTests.java   
@Test
public void configuresInMemoryTraceRepository() throws Exception {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
            TraceRepositoryAutoConfiguration.class);
    assertNotNull(context.getBean(InMemoryTraceRepository.class));
    context.close();
}
项目:contestparser    文件:TraceRepositoryAutoConfigurationTests.java   
@Test
public void skipsIfRepositoryExists() throws Exception {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
            Config.class, TraceRepositoryAutoConfiguration.class);
    assertThat(context.getBeansOfType(InMemoryTraceRepository.class).size(),
            equalTo(0));
    assertThat(context.getBeansOfType(TraceRepository.class).size(), equalTo(1));
    context.close();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TraceRepositoryAutoConfiguration.java   
@ConditionalOnMissingBean(TraceRepository.class)
@Bean
public InMemoryTraceRepository traceRepository() {
    return new InMemoryTraceRepository();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public TraceEndpoint traceEndpoint() {
    return new TraceEndpoint(this.traceRepository == null
            ? new InMemoryTraceRepository() : this.traceRepository);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TraceRepositoryAutoConfigurationTests.java   
@Test
public void skipsIfRepositoryExists() throws Exception {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
            Config.class, TraceRepositoryAutoConfiguration.class);
    assertThat(context.getBeansOfType(InMemoryTraceRepository.class)).isEmpty();
    assertThat(context.getBeansOfType(TraceRepository.class)).hasSize(1);
    context.close();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TraceEndpointTests.java   
@Bean
public TraceEndpoint endpoint() {
    TraceRepository repository = new InMemoryTraceRepository();
    repository.add(Collections.<String, Object>singletonMap("a", "b"));
    return new TraceEndpoint(repository);
}
项目:spring-boot-concourse    文件:TraceRepositoryAutoConfiguration.java   
@ConditionalOnMissingBean(TraceRepository.class)
@Bean
public InMemoryTraceRepository traceRepository() {
    return new InMemoryTraceRepository();
}
项目:spring-boot-concourse    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public TraceEndpoint traceEndpoint() {
    return new TraceEndpoint(this.traceRepository == null
            ? new InMemoryTraceRepository() : this.traceRepository);
}
项目:spring-boot-concourse    文件:TraceEndpointTests.java   
@Bean
public TraceEndpoint endpoint() {
    TraceRepository repository = new InMemoryTraceRepository();
    repository.add(Collections.<String, Object>singletonMap("a", "b"));
    return new TraceEndpoint(repository);
}
项目:contestparser    文件:TraceRepositoryAutoConfiguration.java   
@ConditionalOnMissingBean(TraceRepository.class)
@Bean
public InMemoryTraceRepository traceRepository() {
    return new InMemoryTraceRepository();
}
项目:contestparser    文件:TraceEndpointTests.java   
@Bean
public TraceEndpoint endpoint() {
    TraceRepository repository = new InMemoryTraceRepository();
    repository.add(Collections.<String, Object>singletonMap("a", "b"));
    return new TraceEndpoint(repository);
}