From 423f8037cea15ce51191feb9c0bc6f128e93e082 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Wed, 30 Nov 2016 10:19:20 +0900 Subject: [PATCH] Polish Closes gh-7530 --- .../boot/autoconfigure/security/SecurityProperties.java | 2 +- .../boot/autoconfigure/web/MultipartProperties.java | 4 ++-- ...ssageConvertersAutoConfigurationWithoutJacksonTests.java | 2 +- .../src/main/asciidoc/appendix-application-properties.adoc | 6 +++--- spring-boot-docs/src/main/asciidoc/getting-started.adoc | 2 +- spring-boot-docs/src/main/asciidoc/howto.adoc | 4 ++-- .../src/main/asciidoc/spring-boot-features.adoc | 6 +++--- .../junit/runner/classpath/ModifiedClassPathRunner.java | 4 ++-- .../boot/test/autoconfigure/jdbc/JdbcTypeExcludeFilter.java | 2 +- .../org/springframework/boot/loader/tools/Repackager.java | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java index e157173a7f..f6de395a3e 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java @@ -214,7 +214,7 @@ public class SecurityProperties implements SecurityPrerequisite { private String contentSecurityPolicy; /** - * Security policy mode. + * Content security policy mode. */ private ContentSecurityPolicyMode contentSecurityPolicyMode = ContentSecurityPolicyMode.DEFAULT; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java index a347979602..ec230a3ad8 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java @@ -29,9 +29,9 @@ import org.springframework.util.StringUtils; * The default is "". A common value is to use the system's temporary directory, which can * be obtained. *
  • {@link #getMaxFileSize() max-file-size} specifies the maximum size permitted for - * uploaded files. The default is 1Mb.
  • + * uploaded files. The default is 1MB. *
  • {@link #getMaxRequestSize() max-request-size} specifies the maximum size allowed - * for {@literal multipart/form-data} requests. The default is 10Mb
  • + * for {@literal multipart/form-data} requests. The default is 10MB *
  • {@link #getFileSizeThreshold() file-size-threshold} specifies the size threshold * after which files will be written to disk. Default is 0, which means that the file will * be written to disk immediately.
  • diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfigurationWithoutJacksonTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfigurationWithoutJacksonTests.java index b5e31fafed..46073b7dde 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfigurationWithoutJacksonTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfigurationWithoutJacksonTests.java @@ -46,7 +46,7 @@ public class HttpMessageConvertersAutoConfigurationWithoutJacksonTests { } @Test - public void autoConfigurationWorksWithSpringHateosButWithoutJackson() + public void autoConfigurationWorksWithSpringHateoasButWithoutJackson() throws Exception { this.context.register(HttpMessageConvertersAutoConfiguration.class); this.context.refresh(); 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 3c41553d81..d28abf5163 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -290,8 +290,8 @@ content into your application; rather pick only the properties that you need. spring.http.multipart.enabled=true # Enable support of multi-part uploads. spring.http.multipart.file-size-threshold=0 # Threshold after which files will be written to disk. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. spring.http.multipart.location= # Intermediate location of uploaded files. - spring.http.multipart.max-file-size=1Mb # Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. - spring.http.multipart.max-request-size=10Mb # Max request size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. + spring.http.multipart.max-file-size=1MB # Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. + spring.http.multipart.max-request-size=10MB # Max request size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. spring.http.multipart.resolve-lazily=false # Whether to resolve the multipart request lazily at the time of file or parameter access. # JACKSON ({sc-spring-boot-autoconfigure}/jackson/JacksonProperties.{sc-ext}[JacksonProperties]) @@ -436,7 +436,7 @@ content into your application; rather pick only the properties that you need. security.filter-dispatcher-types=ASYNC, FORWARD, INCLUDE, REQUEST # Security filter chain dispatcher types. security.headers.cache=true # Enable cache control HTTP headers. security.headers.content-security-policy= # Value for content security policy header. - security.headers.content-security-policy-mode=default # Security policy mode. + security.headers.content-security-policy-mode=default # Content security policy mode. security.headers.content-type=true # Enable "X-Content-Type-Options" header. security.headers.frame=true # Enable "X-Frame-Options" header. security.headers.hsts= # HTTP Strict Transport Security (HSTS) mode (none, domain, all). diff --git a/spring-boot-docs/src/main/asciidoc/getting-started.adoc b/spring-boot-docs/src/main/asciidoc/getting-started.adoc index f714ff8784..8a0dacc3a3 100644 --- a/spring-boot-docs/src/main/asciidoc/getting-started.adoc +++ b/spring-boot-docs/src/main/asciidoc/getting-started.adoc @@ -769,7 +769,7 @@ Save your `pom.xml` and run `mvn package` from the command line: ---- If you look in the `target` directory you should see `myproject-0.0.1-SNAPSHOT.jar`. The -file should be around 10 Mb in size. If you want to peek inside, you can use `jar tvf`: +file should be around 10 MB in size. If you want to peek inside, you can use `jar tvf`: [indent=0] ---- diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 2b12739c39..c29bae81fe 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1332,8 +1332,8 @@ source code for more details. [[howto-multipart-file-upload-configuration]] === Handling Multipart File Uploads Spring Boot embraces the Servlet 3 `javax.servlet.http.Part` API to support uploading -files. By default Spring Boot configures Spring MVC with a maximum file of 1Mb per -file and a maximum of 10Mb of file data in a single request. You may override these +files. By default Spring Boot configures Spring MVC with a maximum file of 1MB per +file and a maximum of 10MB of file data in a single request. You may override these values, as well as the location to which intermediate data is stored (e.g., to the `/tmp` directory) and the threshold past which data is flushed to disk by using the properties exposed in the `MultipartProperties` class. If you want to specify that files be 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 a9fac2aebc..d3852fe5be 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1356,7 +1356,7 @@ current directory. relative to the current directory. |=== -Log files will rotate when they reach 10 Mb and as with console output, `ERROR`, `WARN` +Log files will rotate when they reach 10 MB and as with console output, `ERROR`, `WARN` and `INFO` level messages are logged by default. NOTE: The logging system is initialized early in the application lifecycle and as such @@ -4466,7 +4466,7 @@ reached. [[boot-features-kafka]] === Apache Kafka Support -http://kafka.apache.org/[Apache Kafa] is supported by providing auto-configuration of the +http://kafka.apache.org/[Apache Kafka] is supported by providing auto-configuration of the `spring-kafka` project. Kafka configuration is controlled by external configuration properties in @@ -5308,7 +5308,7 @@ and/or a `WebDriver` bean. Here is an example that uses HtmlUnit: NOTE: By default Spring Boot will put `WebDriver` beans in a special "`scope`" to ensure that the driver is quit after each test, and that a new instance is injected. If you don't -want this behavor you can add `@Scope("singleton")` to your `WebDriver` `@Bean` +want this behavior you can add `@Scope("singleton")` to your `WebDriver` `@Bean` definition. A list of the auto-configuration that is enabled by `@WebMvcTest` can be diff --git a/spring-boot-junit-runners/src/main/java/org/springframework/boot/junit/runner/classpath/ModifiedClassPathRunner.java b/spring-boot-junit-runners/src/main/java/org/springframework/boot/junit/runner/classpath/ModifiedClassPathRunner.java index 8f8abd935c..ad471a2d8d 100644 --- a/spring-boot-junit-runners/src/main/java/org/springframework/boot/junit/runner/classpath/ModifiedClassPathRunner.java +++ b/spring-boot-junit-runners/src/main/java/org/springframework/boot/junit/runner/classpath/ModifiedClassPathRunner.java @@ -186,8 +186,8 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner { private List createDependencies(String[] allCoordinates) { List dependencies = new ArrayList(); - for (String coordinates : allCoordinates) { - dependencies.add(new Dependency(new DefaultArtifact(coordinates), null)); + for (String coordinate : allCoordinates) { + dependencies.add(new Dependency(new DefaultArtifact(coordinate), null)); } return dependencies; } diff --git a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTypeExcludeFilter.java b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTypeExcludeFilter.java index 9effe0d700..8825771cda 100644 --- a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTypeExcludeFilter.java +++ b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTypeExcludeFilter.java @@ -28,7 +28,7 @@ import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; /** - * {@link TypeExcludeFilter} for {@link JdbcTest @Jdbctest}. + * {@link TypeExcludeFilter} for {@link JdbcTest @JdbcTest}. * * @author Stephane Nicoll */ diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java index 0ec437f1a8..165a5bb0f8 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java @@ -86,7 +86,7 @@ public class Repackager { } /** - * Add a listener that will be triggered to dispaly a warning if searching for the + * Add a listener that will be triggered to display a warning if searching for the * main class takes too long. * @param listener the listener to add */