From 5bc9d5b380ad395d5e0050deae2ffdacdce573ad Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Wed, 29 Jun 2016 13:51:52 +0900 Subject: [PATCH] Polish Closes gh-6244 --- .../ElasticsearchHealthIndicatorConfiguration.java | 2 +- .../HealthIndicatorAutoConfigurationTests.java | 2 +- .../autoconfigure/elasticsearch/jest/JestProperties.java | 2 +- .../main/asciidoc/appendix-application-properties.adoc | 4 ++-- .../src/main/asciidoc/production-ready-features.adoc | 2 +- .../src/main/asciidoc/spring-boot-features.adoc | 7 +++---- .../test/web/client/RootUriRequestExpectationManager.java | 8 ++++---- .../web/client/RootUriRequestExpectationManagerTests.java | 6 +++--- 8 files changed, 16 insertions(+), 17 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ElasticsearchHealthIndicatorConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ElasticsearchHealthIndicatorConfiguration.java index 00744e419b3..171951391f8 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ElasticsearchHealthIndicatorConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ElasticsearchHealthIndicatorConfiguration.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** - * Actual ElasticSearch health indicator configurations imported by + * Actual Elasticsearch health indicator configurations imported by * {@link HealthIndicatorAutoConfiguration}. * * @author Stephane Nicoll diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java index 356afeea616..09a11cd3505 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java @@ -427,7 +427,7 @@ public class HealthIndicatorAutoConfigurationTests { } @Test - public void notElasticSearchHealthIndicator() { + public void notElasticsearchHealthIndicator() { EnvironmentTestUtils.addEnvironment(this.context, "management.health.elasticsearch.enabled:false", "spring.data.elasticsearch.properties.path.home:target", diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestProperties.java index bf9ef4d5e87..d8bda7c6a33 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestProperties.java @@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class JestProperties { /** - * Comma-separated list of the elasticsearch instances to use. + * Comma-separated list of the Elasticsearch instances to use. */ private List uris = Collections.singletonList("http://localhost:9200"); diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 0188e320075..cd197f28190 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -629,11 +629,11 @@ content into your application; rather pick only the properties that you need. spring.datasource.url= # JDBC url of the database. spring.datasource.username= - # JEST (ElasticSearch HTTP client) ({sc-spring-boot-autoconfigure}/jest/JestProperties.{sc-ext}[JestProperties]) + # JEST (Elasticsearch HTTP client) ({sc-spring-boot-autoconfigure}/jest/JestProperties.{sc-ext}[JestProperties]) spring.elasticsearch.jest.connection-timeout=3000 # Connection timeout in milliseconds. spring.elasticsearch.jest.password= # Login password. spring.elasticsearch.jest.read-timeout=3000 # Read timeout in milliseconds. - spring.elasticsearch.jest.uris=http://localhost:9200 # Comma-separated list of the elasticsearch instances to use. + spring.elasticsearch.jest.uris=http://localhost:9200 # Comma-separated list of the Elasticsearch instances to use. spring.elasticsearch.jest.username= # Login user. # H2 Web Console ({sc-spring-boot-autoconfigure}/h2/H2ConsoleProperties.{sc-ext}[H2ConsoleProperties]) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 6c0d2d273ab..e7704882f53 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -292,7 +292,7 @@ The following `HealthIndicators` are auto-configured by Spring Boot when appropr |Checks that a connection to `DataSource` can be obtained. |{sc-spring-boot-actuator}/health/ElasticsearchHealthIndicator.{sc-ext}[`ElasticsearchHealthIndicator`] -|Checks that an ElasticSearch cluster is up. +|Checks that an Elasticsearch cluster is up. |{sc-spring-boot-actuator}/health/JmsHealthIndicator.{sc-ext}[`JmsHealthIndicator`] |Checks that a JMS broker is up. diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 828e4ec9480..7eca78f00e9 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -3335,7 +3335,7 @@ https://github.com/searchbox-io/Jest[Jest]. [[boot-features-connecting-to-elasticsearch-jest]] -==== Connecting to Elasticsearch using Spring Data +==== Connecting to Elasticsearch using Jest If you have `Jest` on the classpath, you can inject an auto-configured `JestClient` targeting `http://localhost:9200` by default. You can further tune how the client is configured: @@ -3352,14 +3352,13 @@ To take full control over the registration, define a `JestClient` bean. -[[boot-features-connecting-to-elasticsearch]] [[boot-features-connecting-to-elasticsearch-spring-data]] ==== Connecting to Elasticsearch using Spring Data You can inject an auto-configured `ElasticsearchTemplate` or Elasticsearch `Client` instance as you would any other Spring Bean. By default the instance will embed a -local in-memory server (a `Node` in ElasticSearch terms) and use the current working +local in-memory server (a `Node` in Elasticsearch terms) and use the current working directory as the home directory for the server. In this setup, the first thing to do -is to tell ElasticSearch where to store its files: +is to tell Elasticsearch where to store its files: [source,properties,indent=0] ---- diff --git a/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManager.java b/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManager.java index 80a74c8109f..c3f6a5d8897 100644 --- a/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManager.java +++ b/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManager.java @@ -37,7 +37,7 @@ import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriTemplateHandler; /** - * {@link RequestExpectationManager} that strips any the specified root URI from the + * {@link RequestExpectationManager} that strips the specified root URI from the * request before verification. Can be used to simply test declarations when all REST * calls start the same way. For example:
  * RestTemplate restTemplate = new RestTemplateBuilder().rootUri("http://example.com").build();
@@ -107,7 +107,7 @@ public class RootUriRequestExpectationManager implements RequestExpectationManag
 	/**
 	 * Return a bound {@link MockRestServiceServer} for the given {@link RestTemplate},
 	 * configured with {@link RootUriRequestExpectationManager} when possible.
-	 * @param restTemplate the source reset template
+	 * @param restTemplate the source REST template
 	 * @return a configured {@link MockRestServiceServer}
 	 */
 	public static MockRestServiceServer bindTo(RestTemplate restTemplate) {
@@ -117,7 +117,7 @@ public class RootUriRequestExpectationManager implements RequestExpectationManag
 	/**
 	 * Return a bound {@link MockRestServiceServer} for the given {@link RestTemplate},
 	 * configured with {@link RootUriRequestExpectationManager} when possible.
-	 * @param restTemplate the source reset template
+	 * @param restTemplate the source REST template
 	 * @param expectationManager the source {@link RequestExpectationManager}
 	 * @return a configured {@link MockRestServiceServer}
 	 */
@@ -132,7 +132,7 @@ public class RootUriRequestExpectationManager implements RequestExpectationManag
 	 * {@link RestTemplate}. If the {@link RestTemplate} is using a
 	 * {@link RootUriTemplateHandler} then a {@link RootUriRequestExpectationManager} is
 	 * returned, otherwise the source manager is returned unchanged.
-	 * @param restTemplate the source reset template
+	 * @param restTemplate the source REST template
 	 * @param expectationManager the source {@link RequestExpectationManager}
 	 * @return a {@link RequestExpectationManager} to be bound to the template
 	 */
diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java
index ad950a062bb..5fd4fb74f0f 100644
--- a/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java
+++ b/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java
@@ -134,7 +134,7 @@ public class RootUriRequestExpectationManagerTests {
 	}
 
 	@Test
-	public void bindToShouldReturnMockResetServiceServer() throws Exception {
+	public void bindToShouldReturnMockRestServiceServer() throws Exception {
 		RestTemplate restTemplate = new RestTemplateBuilder().build();
 		MockRestServiceServer bound = RootUriRequestExpectationManager
 				.bindTo(restTemplate);
@@ -142,7 +142,7 @@ public class RootUriRequestExpectationManagerTests {
 	}
 
 	@Test
-	public void bindToWithExpectationManagerShouldReturnMockResetServiceServer()
+	public void bindToWithExpectationManagerShouldReturnMockRestServiceServer()
 			throws Exception {
 		RestTemplate restTemplate = new RestTemplateBuilder().build();
 		MockRestServiceServer bound = RootUriRequestExpectationManager
@@ -161,7 +161,7 @@ public class RootUriRequestExpectationManagerTests {
 	}
 
 	@Test
-	public void forRestTemplateWhenNotUsingRootUriTemplateHandlerShouldReturnOriginalUriRequestExpectationManager()
+	public void forRestTemplateWhenNotUsingRootUriTemplateHandlerShouldReturnOriginalRequestExpectationManager()
 			throws Exception {
 		RestTemplate restTemplate = new RestTemplateBuilder().build();
 		RequestExpectationManager actual = RootUriRequestExpectationManager