Java 类org.springframework.boot.actuate.endpoint.EnvironmentEndpoint 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EnvironmentMvcEndpoint.java   
@Override
protected Object getOptionalValue(Environment source, String name) {
    Object result = source.getProperty(name);
    if (result != null) {
        result = ((EnvironmentEndpoint) getDelegate()).sanitize(name, result);
    }
    return result;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EnvironmentMvcEndpoint.java   
@Override
protected Object getValue(Environment source, String name) {
    String result = source.getProperty(name);
    if (result == null) {
        throw new NoSuchPropertyException("No such property: " + name);
    }
    return ((EnvironmentEndpoint) getDelegate()).sanitize(name, result);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfigurationTests.java   
@Test
public void endpoints() throws Exception {
    load(EndpointAutoConfiguration.class);
    assertThat(this.context.getBean(BeansEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(DumpEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(EnvironmentEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(HealthEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(InfoEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(MetricsEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(ShutdownEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(TraceEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(RequestMappingEndpoint.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EnvironmentMvcEndpointTests.java   
@Before
public void setUp() {
    this.context.getBean(EnvironmentEndpoint.class).setEnabled(true);
    this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
    EnvironmentTestUtils.addEnvironment((ConfigurableApplicationContext) this.context,
            "foo:bar", "fool:baz");
}
项目:spring-boot-concourse    文件:EnvironmentMvcEndpoint.java   
@Override
protected Object getOptionalValue(Environment source, String name) {
    Object result = source.getProperty(name);
    if (result != null) {
        result = ((EnvironmentEndpoint) getDelegate()).sanitize(name, result);
    }
    return result;
}
项目:spring-boot-concourse    文件:EnvironmentMvcEndpoint.java   
@Override
protected Object getValue(Environment source, String name) {
    String result = source.getProperty(name);
    if (result == null) {
        throw new NoSuchPropertyException("No such property: " + name);
    }
    return ((EnvironmentEndpoint) getDelegate()).sanitize(name, result);
}
项目:spring-boot-concourse    文件:EndpointAutoConfigurationTests.java   
@Test
public void endpoints() throws Exception {
    load(EndpointAutoConfiguration.class);
    assertThat(this.context.getBean(BeansEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(DumpEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(EnvironmentEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(HealthEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(InfoEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(MetricsEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(ShutdownEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(TraceEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(RequestMappingEndpoint.class)).isNotNull();
}
项目:spring-boot-concourse    文件:EnvironmentMvcEndpointTests.java   
@Before
public void setUp() {
    this.context.getBean(EnvironmentEndpoint.class).setEnabled(true);
    this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
    EnvironmentTestUtils.addEnvironment((ConfigurableApplicationContext) this.context,
            "foo:bar", "fool:baz");
}
项目:contestparser    文件:EnvironmentMvcEndpoint.java   
@Override
protected Object getValue(Environment source, String name) {
    String result = source.getProperty(name);
    if (result == null) {
        throw new NoSuchPropertyException("No such property: " + name);
    }
    return ((EnvironmentEndpoint) getDelegate()).sanitize(name, result);
}
项目:contestparser    文件:EndpointAutoConfigurationTests.java   
@Test
public void endpoints() throws Exception {
    load(EndpointAutoConfiguration.class);
    assertNotNull(this.context.getBean(BeansEndpoint.class));
    assertNotNull(this.context.getBean(DumpEndpoint.class));
    assertNotNull(this.context.getBean(EnvironmentEndpoint.class));
    assertNotNull(this.context.getBean(HealthEndpoint.class));
    assertNotNull(this.context.getBean(InfoEndpoint.class));
    assertNotNull(this.context.getBean(MetricsEndpoint.class));
    assertNotNull(this.context.getBean(ShutdownEndpoint.class));
    assertNotNull(this.context.getBean(TraceEndpoint.class));
    assertNotNull(this.context.getBean(RequestMappingEndpoint.class));
}
项目:contestparser    文件:EnvironmentMvcEndpointTests.java   
@Before
public void setUp() {
    this.context.getBean(EnvironmentEndpoint.class).setEnabled(true);
    this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
    EnvironmentTestUtils.addEnvironment((ConfigurableApplicationContext) this.context,
            "foo:bar", "fool:baz");
}
项目:generator-jhipster-grpc    文件:_EnvironmentService.java   
public EnvironmentService(EnvironmentEndpoint endpoint) {
    this.endpoint = endpoint;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointWebMvcManagementContextConfiguration.java   
@Bean
@ConditionalOnBean(EnvironmentEndpoint.class)
@ConditionalOnEnabledEndpoint("env")
public EnvironmentMvcEndpoint environmentMvcEndpoint(EnvironmentEndpoint delegate) {
    return new EnvironmentMvcEndpoint(delegate);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public EnvironmentEndpoint environmentEndpoint() {
    return new EnvironmentEndpoint();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EnvironmentMvcEndpoint.java   
public EnvironmentMvcEndpoint(EnvironmentEndpoint delegate) {
    super(delegate);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EnvironmentMvcEndpointTests.java   
@Test
public void subWhenDisabled() throws Exception {
    this.context.getBean(EnvironmentEndpoint.class).setEnabled(false);
    this.mvc.perform(get("/env/foo")).andExpect(status().isNotFound());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EnvironmentMvcEndpointTests.java   
@Bean
public EnvironmentEndpoint endpoint() {
    return new EnvironmentEndpoint();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringBootHypermediaApplication.java   
@Bean
public EnvironmentEndpoint environmentEndpoint() {
    return new LimitedEnvironmentEndpoint();
}
项目:spring-boot-concourse    文件:EndpointWebMvcManagementContextConfiguration.java   
@Bean
@ConditionalOnBean(EnvironmentEndpoint.class)
@ConditionalOnEnabledEndpoint("env")
public EnvironmentMvcEndpoint environmentMvcEndpoint(EnvironmentEndpoint delegate) {
    return new EnvironmentMvcEndpoint(delegate);
}
项目:spring-boot-concourse    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public EnvironmentEndpoint environmentEndpoint() {
    return new EnvironmentEndpoint();
}
项目:spring-boot-concourse    文件:EnvironmentMvcEndpoint.java   
public EnvironmentMvcEndpoint(EnvironmentEndpoint delegate) {
    super(delegate);
}
项目:spring-boot-concourse    文件:EnvironmentMvcEndpointTests.java   
@Test
public void subWhenDisabled() throws Exception {
    this.context.getBean(EnvironmentEndpoint.class).setEnabled(false);
    this.mvc.perform(get("/env/foo")).andExpect(status().isNotFound());
}
项目:spring-boot-concourse    文件:EnvironmentMvcEndpointTests.java   
@Bean
public EnvironmentEndpoint endpoint() {
    return new EnvironmentEndpoint();
}
项目:contestparser    文件:EndpointWebMvcManagementContextConfiguration.java   
@Bean
@ConditionalOnBean(EnvironmentEndpoint.class)
@ConditionalOnEnabledEndpoint("env")
public EnvironmentMvcEndpoint environmentMvcEndpoint(EnvironmentEndpoint delegate) {
    return new EnvironmentMvcEndpoint(delegate);
}
项目:contestparser    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public EnvironmentEndpoint environmentEndpoint() {
    return new EnvironmentEndpoint();
}
项目:contestparser    文件:EnvironmentMvcEndpoint.java   
public EnvironmentMvcEndpoint(EnvironmentEndpoint delegate) {
    super(delegate);
}
项目:contestparser    文件:EnvironmentMvcEndpointTests.java   
@Test
public void subWhenDisabled() throws Exception {
    this.context.getBean(EnvironmentEndpoint.class).setEnabled(false);
    this.mvc.perform(get("/env/foo")).andExpect(status().isNotFound());
}
项目:contestparser    文件:EnvironmentMvcEndpointTests.java   
@Bean
public EnvironmentEndpoint endpoint() {
    return new EnvironmentEndpoint();
}