From 4c1398148b6d8ad02eaaceec83e0d0d2d78050ab Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Wed, 11 Nov 2015 21:45:43 +0900 Subject: [PATCH] Polish docs Closes gh-4433 --- .../DataSourceHealthIndicatorTests.java | 4 +-- .../src/main/asciidoc/build-tool-plugins.adoc | 4 +-- spring-boot-docs/src/main/asciidoc/howto.adoc | 26 +++++++++---------- .../src/main/asciidoc/spring-boot-cli.adoc | 6 ++--- .../main/asciidoc/spring-boot-features.adoc | 2 +- .../logging/logback/LogbackLoggingSystem.java | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DataSourceHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DataSourceHealthIndicatorTests.java index aeed0f7528f..62fcf46beb6 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DataSourceHealthIndicatorTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DataSourceHealthIndicatorTests.java @@ -110,7 +110,7 @@ public class DataSourceHealthIndicatorTests { } @Test - public void productLooksups() throws Exception { + public void productLookups() throws Exception { assertThat(Product.forProduct("newone"), nullValue()); assertThat(Product.forProduct("HSQL Database Engine"), equalTo(Product.HSQLDB)); assertThat(Product.forProduct("Oracle"), equalTo(Product.ORACLE)); @@ -118,7 +118,7 @@ public class DataSourceHealthIndicatorTests { assertThat(Product.forProduct("DB2"), equalTo(Product.DB2)); assertThat(Product.forProduct("DB2/LINUXX8664"), equalTo(Product.DB2)); assertThat(Product.forProduct("DB2 UDB for AS/400"), equalTo(Product.DB2_AS400)); - assertThat(Product.forProduct("DB3 XDB fur AS/400"), equalTo(Product.DB2_AS400)); + assertThat(Product.forProduct("DB3 XDB for AS/400"), equalTo(Product.DB2_AS400)); assertThat(Product.forProduct("Informix Dynamic Server"), equalTo(Product.INFORMIX)); assertThat(Product.forProduct("Firebird 2.5.WI"), equalTo(Product.FIREBIRD)); diff --git a/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc b/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc index 59dd7a59d20..193a2480d54 100644 --- a/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc +++ b/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc @@ -662,7 +662,7 @@ attributes are supported by the task: |Yes |`classes` -|The root directory of Java classfiles +|The root directory of Java class files |Yes |`start-class` @@ -726,7 +726,7 @@ attributes are supported |Attribute |Description |Required |`classesroot` -|The root directory of Java classfiles +|The root directory of Java class files |Yes _(unless `mainclass` is specified)_ |`mainclass` diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index a50694b9b3c..e6677de70da 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -57,7 +57,7 @@ rules of thumb: specifically for OS environment variables (so `CAPITALS_AND_UNDERSCORES` are synonyms for `period.separated`). * Look for `@ConditionalOnExpression` annotations that switch features on and off in - response to SpEL expressions, normally evaluated with place-holders resolved from the + response to SpEL expressions, normally evaluated with placeholders resolved from the `Environment`. @@ -395,7 +395,7 @@ need to specify a `dispatcherType` yourself: [[howto-disable-registration-of-a-servlet-or-filter]] ===== Disable registration of a Servlet or Filter -As <> any `Servlet` +As <> any `Servlet` or `Filter` beans will be registered with the servlet container automatically. To disable registration of a particular `Filter` or `Servlet` bean create a registration bean for it and mark it as disabled. For example: @@ -955,7 +955,7 @@ To use it, add the following dependency to your project: ---- -You may also want to add a dependency on Woodstox. It's faster than the default Stax +You may also want to add a dependency on Woodstox. It's faster than the default StAX implementation provided by the JDK and also adds pretty print support and improved namespace handling: @@ -1166,7 +1166,7 @@ added. looks for resources in a loader path by surrounding the view name with a prefix and suffix (externalized to `spring.groovy.template.prefix` and `spring.groovy.template.suffix`, defaults '`classpath:/templates/`' and '`.tpl`' - respectively). It can be overriden by providing a bean of the same name. + respectively). It can be overridden by providing a bean of the same name. * If you use Velocity you will also have a `VelocityViewResolver` with id '`velocityViewResolver`'. It looks for resources in a loader path (externalized to `spring.velocity.resourceLoaderPath`, default '`classpath:/templates/`') by surrounding the view name with a prefix and suffix @@ -1208,7 +1208,7 @@ have been applied from the auto-configuration: [[howto-logging]] == Logging -Spring Boot has no mandatory logging dependence, except for the `commons-logging` API, of +Spring Boot has no mandatory logging dependency, except for the `commons-logging` API, of which there are many implementations to choose from. To use http://logback.qos.ch[Logback] you need to include it, and some bindings for `commons-logging` on the classpath. The simplest way to do that is through the starter poms which all depend on @@ -1247,7 +1247,7 @@ using the "logging.config" property. -[[howto-configure-logback-for-loggin]] +[[howto-configure-logback-for-logging]] === Configure Logback for logging If you put a `logback.xml` in the root of your classpath it will be picked up from there @@ -1629,13 +1629,13 @@ classpath). In addition Spring Boot will load the `schema-${platform}.sql` and `data-${platform}.sql` files (if present), where `platform` is the value of `spring.datasource.platform`, e.g. you might choose to set it to the vendor name of the database (`hsqldb`, `h2`, `oracle`, `mysql`, -`postgresql` etc.). Spring Boot enables the failfast feature of the Spring JDBC +`postgresql` etc.). Spring Boot enables the fail-fast feature of the Spring JDBC initializer by default, so if the scripts cause exceptions the application will fail to start. The script locations can be changed by setting `spring.datasource.schema` and `spring.datasource.data`, and neither location will be processed if `spring.datasource.initialize=false`. -To disable the failfast you can set `spring.datasource.continueOnError=true`. This can be +To disable the fail-fast you can set `spring.datasource.continueOnError=true`. This can be useful once an application has matured and been deployed a few times, since the scripts can act as '`poor man's migrations`' -- inserts that fail mean that the data is already there, so there would be no need to prevent the application from running, for instance. @@ -1898,7 +1898,7 @@ Most of the templating technologies supported by Spring Boot include a configura option to disable caching (see below for details). If you're using the `spring-boot-devtools` module these properties will be <> -for you at developement time. +for you at development time. @@ -2575,12 +2575,12 @@ Boot application, and the guidance above might help, but your mileage may vary. [[howto-weblogic]] -=== Deploying a WAR to Weblogic -To deploy a Spring Boot application to Weblogic you must ensure that your servlet +=== Deploying a WAR to WebLogic +To deploy a Spring Boot application to WebLogic you must ensure that your servlet initializer *directly* implements `WebApplicationInitializer` (even if you extend from a base class that already implements it). -A typical initializer for Weblogic would be something like this: +A typical initializer for WebLogic would be something like this: [source,java,indent=0,subs="verbatim,quotes,attributes"] ---- @@ -2594,7 +2594,7 @@ A typical initializer for Weblogic would be something like this: } ---- -If you use logback, you will also need to tell Weblogic to prefer the packaged version +If you use logback, you will also need to tell WebLogic to prefer the packaged version rather than the version that pre-installed with the server. You can do this by adding a `WEB-INF/weblogic.xml` file with the following contents: diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc index 7f979fe2891..0762ac69784 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc @@ -219,7 +219,7 @@ By default, the CLI uses the dependency management declared in `spring-boot-depe when resolving `@Grab` dependencies. Additional dependency management, that will override the default dependency management, can be configured using the `@DependencyManagementBom` annotation. The annotation's value should specify the coordinates -(`groupId:artifactId:version`) of one or more Maven boms. +(`groupId:artifactId:version`) of one or more Maven BOMs. For example, the following declaration: @@ -231,7 +231,7 @@ For example, the following declaration: Will pick up `custom-bom-1.0.0.pom` in a Maven repository under `com/example/custom-versions/1.0.0/`. -When multiple boms are specified they are applied in the order that they're declared. +When multiple BOMs are specified they are applied in the order that they're declared. For example: [source,java,indent=0] @@ -248,7 +248,7 @@ ensure consistent ordering of the dependency management, you can only use `@DependencyManagementBom` at most once in your application. A useful source of dependency management (that is a superset of Spring Boot's dependency management) is the http://platform.spring.io/[Spring IO Platform], e.g. -`@DepenedencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')`. +`@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')`. 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 a5bc33b45a7..7df2523f963 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1865,7 +1865,7 @@ authentication manager configuration). To customize it you normally use external properties and beans of type `WebSecurityConfigurerAdapter` (e.g. to add form-based login). To also switch off the authentication manager configuration you can add a bean of type `AuthenticationManager`, or else configure the -global `AuthenticationManager` by `@Autowiring` an `AuthenticationManagerBuilder` into +global `AuthenticationManager` by autowiring an `AuthenticationManagerBuilder` into a method in one of your `@Configuration` classes. There are several secure applications in the {github-code}/spring-boot-samples/[Spring Boot samples] to get you started with common use cases. diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java b/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java index 357159bacc5..31a5bfca8e9 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java @@ -225,7 +225,7 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem { "LoggerFactory is not a Logback LoggerContext but Logback is on " + "the classpath. Either remove Logback or the competing " + "implementation (%s loaded from %s). If you are using " - + "Weblogic you will need to add 'org.slf4j' to " + + "WebLogic you will need to add 'org.slf4j' to " + "prefer-application-packages in WEB-INF/weblogic.xml", factory.getClass(), getLocation(factory))); return (LoggerContext) factory;