From 249ed899a6d724b3954a68c5feb9e2c88373fc23 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 20 Nov 2016 15:51:47 +0900 Subject: [PATCH] Fix use of KB and MB in Multipart documentation Closes gh-7364 --- .../boot/autoconfigure/web/MultipartProperties.java | 6 +++--- .../boot/web/servlet/MultipartConfigFactory.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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 315d6484fc4..a3479796024 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 @@ -39,7 +39,7 @@ import org.springframework.util.StringUtils; *

* These properties are ultimately passed through {@link MultipartConfigFactory} which * means you may specify the values using {@literal long} values or using more readable - * {@literal String} variants that accept {@literal Kb} or {@literal Mb} suffixes. + * {@literal String} variants that accept {@literal KB} or {@literal MB} suffixes. * * @author Josh Long * @author Toshiaki Maki @@ -62,13 +62,13 @@ public class MultipartProperties { * Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or * Kilobyte size. */ - private String maxFileSize = "1Mb"; + private String maxFileSize = "1MB"; /** * Max request size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte * or Kilobyte size. */ - private String maxRequestSize = "10Mb"; + private String maxRequestSize = "10MB"; /** * Threshold after which files will be written to disk. Values can use the suffixed diff --git a/spring-boot/src/main/java/org/springframework/boot/web/servlet/MultipartConfigFactory.java b/spring-boot/src/main/java/org/springframework/boot/web/servlet/MultipartConfigFactory.java index 85eb0e459c5..fe7ccb6d804 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/servlet/MultipartConfigFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/servlet/MultipartConfigFactory.java @@ -26,8 +26,8 @@ import org.springframework.util.Assert; * readable {@literal String} variants that accept KB or MB suffixes, for example: * *

- * factory.setMaxFileSize("10Mb");
- * factory.setMaxRequestSize("100Kb");
+ * factory.setMaxFileSize("10MB");
+ * factory.setMaxRequestSize("100KB");
  * 
* * @author Phillip Webb