From 9e1ef76f848a6bf3127e7fa013b764fcaa4f0b53 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 1 Oct 2021 07:38:41 +0200 Subject: [PATCH] Polish "Replace latin locutions in the documentation" See gh-28141 --- .../asciidoc/features/developing-auto-configuration.adoc | 2 +- .../src/docs/asciidoc/features/external-config.adoc | 6 +++--- .../src/docs/asciidoc/features/internationalization.adoc | 2 +- .../asciidoc/features/task-execution-and-scheduling.adoc | 2 +- .../spring-boot-docs/src/docs/asciidoc/howto/actuator.adoc | 3 ++- .../src/docs/asciidoc/howto/application.adoc | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc index de3d99ab5b..227bc36db1 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc @@ -261,7 +261,7 @@ Here are some rules we follow internally to make sure descriptions are consisten * Do not start the description by "The" or "A". * For `boolean` types, start the description with "Whether" or "Enable". * For collection-based types, start the description with "Comma-separated list" -* Use `java.time.Duration` rather than `long` and describe the default unit if it differs from milliseconds, for example "If a duration suffix is not specified, seconds will be used". +* Use `java.time.Duration` rather than `long` and describe the default unit if it differs from milliseconds, such as "If a duration suffix is not specified, seconds will be used". * Do not provide the default value in the description unless it has to be determined at runtime. Make sure to <> so that IDE assistance is available for your keys as well. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc index 0e8806abe9..9752e849f7 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc @@ -1048,7 +1048,7 @@ If you expose a `java.time.Duration` property, the following formats in applicat * A regular `long` representation (using milliseconds as the default unit unless a `@DurationUnit` has been specified) * The standard ISO-8601 format {java-api}/java/time/Duration.html#parse-java.lang.CharSequence-[used by `java.time.Duration`] -* A more readable format where the value and the unit are coupled (for example `10s` means 10 seconds) +* A more readable format where the value and the unit are coupled (`10s` means 10 seconds) Consider the following example: @@ -1093,7 +1093,7 @@ The following formats can be used in application properties: * An regular `int` representation (using days as the default unit unless a `@PeriodUnit` has been specified) * The standard ISO-8601 format {java-api}/java/time/Period.html#parse-java.lang.CharSequence-[used by `java.time.Period`] -* A simpler format where the value and the unit pairs are coupled (for example `1y3d` means 1 year and 3 days) +* A simpler format where the value and the unit pairs are coupled (`1y3d` means 1 year and 3 days) The following units are supported with the simple format: @@ -1112,7 +1112,7 @@ Spring Framework has a `DataSize` value type that expresses a size in bytes. If you expose a `DataSize` property, the following formats in application properties are available: * A regular `long` representation (using bytes as the default unit unless a `@DataSizeUnit` has been specified) -* A more readable format where the value and the unit are coupled (for example `10MB` means 10 megabytes) +* A more readable format where the value and the unit are coupled (`10MB` means 10 megabytes) Consider the following example: diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/internationalization.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/internationalization.adoc index 4efd0324d9..bc0b7c43a4 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/internationalization.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/internationalization.adoc @@ -3,7 +3,7 @@ Spring Boot supports localized messages so that your application can cater to users of different language preferences. By default, Spring Boot looks for the presence of a `messages` resource bundle at the root of the classpath. -NOTE: The auto-configuration applies when the default properties file for the configured resource bundle is available (that is `messages.properties` by default). +NOTE: The auto-configuration applies when the default properties file for the configured resource bundle is available (`messages.properties` by default). If your resource bundle contains only language-specific properties files, you are required to add the default. If no properties file is found that matches any of the configured base names, there will be no auto-configured `MessageSource`. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/task-execution-and-scheduling.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/task-execution-and-scheduling.adoc index 1a5f3ddf94..71c66a419a 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/task-execution-and-scheduling.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/task-execution-and-scheduling.adoc @@ -27,7 +27,7 @@ Those default settings can be fine-tuned using the `spring.task.execution` names This changes the thread pool to use a bounded queue so that when the queue is full (100 tasks), the thread pool increases to maximum 16 threads. Shrinking of the pool is more aggressive as threads are reclaimed when they are idle for 10 seconds (rather than 60 seconds by default). -A `ThreadPoolTaskScheduler` can also be auto-configured if need to be associated to scheduled task execution (for example `@EnableScheduling`). +A `ThreadPoolTaskScheduler` can also be auto-configured if need to be associated to scheduled task execution (using `@EnableScheduling` for instance). The thread pool uses one thread by default and its settings can be fine-tuned using the `spring.task.scheduling` namespace, as shown in the following example: [source,yaml,indent=0,subs="verbatim",configprops,configblocks] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/actuator.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/actuator.adoc index 8bfd99f396..f348728b6d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/actuator.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/actuator.adoc @@ -36,7 +36,8 @@ See also the section on "`<>`" in the '`Spr Not all Spring applications have to be web applications (or web services). If you want to execute some code in a `main` method but also bootstrap a Spring application to set up the infrastructure to use, you can use the `SpringApplication` features of Spring Boot. A `SpringApplication` changes its `ApplicationContext` class, depending on whether it thinks it needs a web application or not. -The first thing you can do to help it is to leave server-related dependencies (for example servlet API) off the classpath. +The first thing you can do to help it is to leave server-related dependencies (such as the servlet API) off the classpath. If you cannot do that (for example, you run two applications from the same code base) then you can explicitly call `setWebApplicationType(WebApplicationType.NONE)` on your `SpringApplication` instance or set the `applicationContextClass` property (through the Java API or with external properties). Application code that you want to run as your business logic can be implemented as a `CommandLineRunner` and dropped into the context as a `@Bean` definition.