From acc36c076d7e675ac9953f2207aaeddd89cf5fa0 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 17 Jan 2017 13:24:38 +0900 Subject: [PATCH] Polish See gh-8004 --- .../boot/actuate/health/LdapHealthIndicatorTests.java | 2 +- .../data/ldap/LdapRepositoriesAutoConfiguration.java | 2 +- .../main/asciidoc/appendix-application-properties.adoc | 6 +++--- .../src/main/asciidoc/spring-boot-features.adoc | 10 +++++----- .../java/sample/data/ldap/SampleLdapApplication.java | 6 ------ .../SampleHypermediaUiSecureApplicationTests.java | 2 +- .../boot/validation/MessageInterpolatorFactory.java | 2 +- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/LdapHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/LdapHealthIndicatorTests.java index 5a03f2b003..1551506c0b 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/LdapHealthIndicatorTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/LdapHealthIndicatorTests.java @@ -58,7 +58,7 @@ public class LdapHealthIndicatorTests { } @Test - public void indicatorExist() { + public void indicatorExists() { this.context.register(LdapAutoConfiguration.class, LdapDataAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class, diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfiguration.java index 121e719a50..1cc0bd44b8 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfiguration.java @@ -28,7 +28,7 @@ import org.springframework.data.ldap.repository.LdapRepository; import org.springframework.data.ldap.repository.support.LdapRepositoryFactoryBean; /** - * {@link EnableAutoConfiguration Auto-configuration} for Spring Data's Couchbase + * {@link EnableAutoConfiguration Auto-configuration} for Spring Data's LDAP * Repositories. * * @author EddĂș MelĂ©ndez 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 fb0af799b2..5136bd7490 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -316,18 +316,18 @@ content into your application; rather pick only the properties that you need. spring.jersey.type=servlet # Jersey integration type. # SPRING LDAP ({sc-spring-boot-autoconfigure}/ldap/LdapProperties.{sc-ext}[LdapProperties]) - spring.ldap.urls= # LDAP url of the server. + spring.ldap.urls= # LDAP URLs of the server. spring.ldap.base= # Base suffix from which all operations should originate. spring.ldap.username= # Login user of the server. spring.ldap.password= # Login password of the server. - spring.ldap.base-environment.*= # Ldap specification settings. + spring.ldap.base-environment.*= # LDAP specification settings. # EMBEDDED LDAP ({sc-spring-boot-autoconfigure}/ldap/embedded/EmbeddedLdapProperties.{sc-ext}[EmbeddedLdapProperties]) spring.ldap.embedded.port= # Embedded LDAP port. spring.ldap.embedded.credential.username= # Embedded LDAP username. spring.ldap.embedded.credential.password= # Embedded LDAP password. spring.ldap.embedded.base-dn= # The base DN - spring.ldap.embedded.ldif= # Schema (LDIF) script resource reference. + spring.ldap.embedded.ldif=classpath:schema.ldif # Schema (LDIF) script resource reference. # SPRING MOBILE DEVICE VIEWS ({sc-spring-boot-autoconfigure}/mobile/DeviceDelegatingViewResolverAutoConfiguration.{sc-ext}[DeviceDelegatingViewResolverAutoConfiguration]) spring.mobile.devicedelegatingviewresolver.enable-fallback=false # Enable support for fallback resolution. 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 5957e59305..0cf682f828 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -3888,11 +3888,11 @@ implementation. [[boot-features-ldap]] === LDAP https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol[LDAP] (Lightweight -Directory Access Protocol) is an is an open, vendor-neutral, industry standard application +Directory Access Protocol) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an IP network. Spring Boot offers auto-configuration for any compliant LDAP server as well as support for the embedded in-memory LDAP server from -https://www.ldap.com/unboundid-ldap-sdk-for-java[Unbounded]. +https://www.ldap.com/unboundid-ldap-sdk-for-java[UnboundID]. LDAP abstractions are provided by https://github.com/spring-projects/spring-data-ldap[Spring Data LDAP]. @@ -3951,7 +3951,7 @@ other Spring Bean. [[boot-features-ldap-embedded]] ==== Embedded in-memory LDAP server For testing purposes Spring Boot supports auto-configuration of an in-memory LDAP server -from https://www.ldap.com/unboundid-ldap-sdk-for-java[Unbounded]. To configure the server +from https://www.ldap.com/unboundid-ldap-sdk-for-java[UnboundID]. To configure the server add a dependency to `com.unboundid:unboundid-ldapsdk` and declare a `base-dn` property: [source,properties,indent=0] @@ -3959,8 +3959,8 @@ add a dependency to `com.unboundid:unboundid-ldapsdk` and declare a `base-dn` pr spring.ldap.embedded.base-dn=dc=spring,dc=io ---- -By default the server will start on a random port and the trigger the regular LDAP support -(there is not need to specify a `spring.ldap.urls` property). +By default the server will start on a random port and they trigger the regular LDAP support +(there is no need to specify a `spring.ldap.urls` property). If there is a `schema.ldif` file on your classpath it will be used to initialize the server. You can also use the `spring.ldap.embedded.ldif` property if you want to load diff --git a/spring-boot-samples/spring-boot-sample-data-ldap/src/main/java/sample/data/ldap/SampleLdapApplication.java b/spring-boot-samples/spring-boot-sample-data-ldap/src/main/java/sample/data/ldap/SampleLdapApplication.java index 294f08954f..cb03f8dba6 100644 --- a/spring-boot-samples/spring-boot-sample-data-ldap/src/main/java/sample/data/ldap/SampleLdapApplication.java +++ b/spring-boot-samples/spring-boot-sample-data-ldap/src/main/java/sample/data/ldap/SampleLdapApplication.java @@ -44,12 +44,6 @@ public class SampleLdapApplication implements CommandLineRunner { System.out.println("Person found with findByPhone('+46 555-123456'):"); System.out.println("--------------------------------"); System.out.println(this.repository.findByPhone("+46 555-123456")); - // - // System.out.println("Customers found with findByLastName('Smith'):"); - // System.out.println("--------------------------------"); - // for (Customer customer : this.repository.findByLastName("Smith")) { - // System.out.println(customer); - // } } public static void main(String[] args) throws Exception { diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-ui-secure/src/test/java/sample/hypermedia/ui/secure/SampleHypermediaUiSecureApplicationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-ui-secure/src/test/java/sample/hypermedia/ui/secure/SampleHypermediaUiSecureApplicationTests.java index 3c043ff8ae..5a448fa9f3 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-ui-secure/src/test/java/sample/hypermedia/ui/secure/SampleHypermediaUiSecureApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-ui-secure/src/test/java/sample/hypermedia/ui/secure/SampleHypermediaUiSecureApplicationTests.java @@ -43,7 +43,7 @@ public class SampleHypermediaUiSecureApplicationTests { } @Test - public void testInSecureNestedPath() throws Exception { + public void testInsecureNestedPath() throws Exception { ResponseEntity entity = this.restTemplate.getForEntity("/env", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); diff --git a/spring-boot/src/main/java/org/springframework/boot/validation/MessageInterpolatorFactory.java b/spring-boot/src/main/java/org/springframework/boot/validation/MessageInterpolatorFactory.java index 9df5adc1b0..f35f3f89c1 100644 --- a/spring-boot/src/main/java/org/springframework/boot/validation/MessageInterpolatorFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/validation/MessageInterpolatorFactory.java @@ -30,7 +30,7 @@ import org.springframework.beans.factory.ObjectFactory; import org.springframework.util.ClassUtils; /** - * {@link ObjectFactory} that can be used to create a {@link MessageInterpolatorFactory}. + * {@link ObjectFactory} that can be used to create a {@link MessageInterpolator}. * Attempts to pick the most appropriate {@link MessageInterpolator} based on the * classpath. *