Closes gh-5627
pull/5617/merge
Johnny Lim 9 years ago committed by Andy Wilkinson
parent f9b51cc870
commit 3b5ecbd066

@ -24,7 +24,7 @@ import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* Base endpoint element condition. An element can be disabled globally via the `defaults`
* Base endpoint element condition. An element can be disabled globally via the {@code defaults}
* name or individually via the name of the element.
*
* @author Stephane Nicoll

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure;
import org.springframework.context.annotation.Condition;
/**
* {@link Condition} that checks if a info indicator is enabled.
* {@link Condition} that checks if an info indicator is enabled.
*
* @author Stephane Nicoll
*/

@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -219,15 +219,15 @@ public final class Health {
}
/**
* Record detail using {@code key} and {@code value}.
* Record detail using given {@code key} and {@code value}.
* @param key the detail key
* @param data the detail data
* @param value the detail value
* @return this {@link Builder} instance
*/
public Builder withDetail(String key, Object data) {
public Builder withDetail(String key, Object value) {
Assert.notNull(key, "Key must not be null");
Assert.notNull(data, "Data must not be null");
this.details.put(key, data);
Assert.notNull(value, "Value must not be null");
this.details.put(key, value);
return this;
}

@ -26,7 +26,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* Carries information of the application.
* <p>
* Each detail element can be singular or a hierarchical object such as a pojo or a nested
* Each detail element can be singular or a hierarchical object such as a POJO or a nested
* Map.
*
* @author Meang Akira Tanaka
@ -100,13 +100,13 @@ public final class Info {
}
/**
* Record detail using {@code key} and {@code value}.
* Record detail using given {@code key} and {@code value}.
* @param key the detail key
* @param data the detail data
* @param value the detail value
* @return this {@link Builder} instance
*/
public Builder withDetail(String key, Object data) {
this.content.put(key, data);
public Builder withDetail(String key, Object value) {
this.content.put(key, value);
return this;
}
@ -122,7 +122,7 @@ public final class Info {
}
/**
* Create a new {@link Info} instance base on the state of this builder.
* Create a new {@link Info} instance based on the state of this builder.
* @return a new {@link Info} instance
*/
public Info build() {

@ -69,7 +69,7 @@ public class InfoContributorAutoConfigurationTests {
@Test
public void defaultInfoContributorsDisabledWithCustomOne() {
load(CustomInfoProviderConfiguration.class,
load(CustomInfoContributorConfiguration.class,
"management.info.defaults.enabled:false");
Map<String, InfoContributor> beans = this.context
.getBeansOfType(InfoContributor.class);
@ -108,7 +108,7 @@ public class InfoContributorAutoConfigurationTests {
@Test
public void customGitInfoContributor() {
load(CustomGitInfoProviderConfiguration.class);
load(CustomGitInfoContributorConfiguration.class);
assertThat(this.context.getBean(GitInfoContributor.class))
.isSameAs(this.context.getBean("customGitInfoContributor"));
}
@ -143,7 +143,7 @@ public class InfoContributorAutoConfigurationTests {
@Test
public void customBuildInfoContributor() {
load(CustomBuildInfoProviderConfiguration.class);
load(CustomBuildInfoContributorConfiguration.class);
assertThat(this.context.getBean(BuildInfoContributor.class))
.isSameAs(this.context.getBean("customBuildInfoContributor"));
}
@ -198,7 +198,7 @@ public class InfoContributorAutoConfigurationTests {
}
@Configuration
static class CustomInfoProviderConfiguration {
static class CustomInfoContributorConfiguration {
@Bean
public InfoContributor customInfoContributor() {
@ -212,7 +212,7 @@ public class InfoContributorAutoConfigurationTests {
}
@Configuration
static class CustomGitInfoProviderConfiguration {
static class CustomGitInfoContributorConfiguration {
@Bean
public GitInfoContributor customGitInfoContributor() {
@ -222,7 +222,7 @@ public class InfoContributorAutoConfigurationTests {
}
@Configuration
static class CustomBuildInfoProviderConfiguration {
static class CustomBuildInfoContributorConfiguration {
@Bean
public BuildInfoContributor customBuildInfoContributor() {

@ -52,7 +52,7 @@ public class InfoEndpointTests extends AbstractEndpointTests<InfoEndpoint> {
public static class Config {
@Bean
public InfoContributor infoProvider() {
public InfoContributor infoContributor() {
return new InfoContributor() {
@Override

@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Tests for {@link InfoMvcEndpointTests}
* Tests for {@link InfoEndpoint} with {@link MockMvc}.
*
* @author Meang Akira Tanaka
* @author Stephane Nicoll

@ -43,13 +43,14 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Tests for {@link InfoMvcEndpointWithoutAnyInfoProvidersTests}
* Tests for {@link InfoEndpoint} with {@link MockMvc} when there are no
* {@link InfoContributor InfoContributors}.
*
* @author Meang Akira Tanaka
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class InfoMvcEndpointWithoutAnyInfoProvidersTests {
public class InfoMvcEndpointWithNoInfoContributorsTests {
@Autowired
private WebApplicationContext context;
@ -58,7 +59,6 @@ public class InfoMvcEndpointWithoutAnyInfoProvidersTests {
@Before
public void setUp() {
this.context.getBean(InfoEndpoint.class).setEnabled(true);
this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
}

@ -49,6 +49,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Tests for {@link JolokiaMvcEndpoint} with a custom management context path.
*
* @author Christian Dupuis
* @author Dave Syer
*/

@ -30,7 +30,7 @@ import org.springframework.util.ClassUtils;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link ImportAutoConfigurationTests}.
* Tests for {@link ImportAutoConfiguration}.
*
* @author Phillip Webb
*/

@ -969,12 +969,12 @@ content into your application; rather pick only the properties that you need.
# INFO CONTRIBUTORS
management.info.build.enabled=true # Enable build info.
management.info.build.mode=simple # Mode to use to expose build information.
management.info.defaults.enabled=true # Enable default health indicators.
management.info.defaults.enabled=true # Enable default info contributors.
management.info.env.enabled=true # Enable environment info.
management.info.git.enabled=true # Enable git info.
management.info.git.mode=simple # Mode to use to expose git information.
# TRACING (({sc-spring-boot-actuator}/trace/TraceProperties.{sc-ext}[TraceProperties])
# TRACING ({sc-spring-boot-actuator}/trace/TraceProperties.{sc-ext}[TraceProperties])
management.trace.include=request-headers,response-headers,errors # Items to be included in the trace.
# REMOTE SHELL

@ -83,7 +83,7 @@ public class PropertySourcesBinder {
/**
* Extract the keys using the specified {@code prefix}. The prefix won't be included.
* <p>
* Any key that starts with the {@code prefix} will be included
* Any key that starts with the {@code prefix} will be included.
* @param prefix the prefix to use
* @return the keys matching the prefix
*/

Loading…
Cancel
Save