From 78b43279a741c39e9917370558a3e0e2fda35353 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 5 Dec 2022 00:53:39 +0900 Subject: [PATCH] Polish See gh-33455 --- .../integration/IntegrationProperties.java | 2 +- .../src/docs/asciidoc/features/kotlin.adoc | 2 +- .../src/docs/asciidoc/howto/batch.adoc | 2 +- .../asciidoc/native-image/advanced-topics.adoc | 8 ++++---- .../developing-your-first-application.adoc | 16 ++++++++-------- .../introducing-graalvm-native-images.adoc | 4 ++-- .../testing-native-applications.adoc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java index da5555bbb1..f9df9a3a2e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java @@ -170,7 +170,7 @@ public class IntegrationProperties { public static class Error { /** - * Whether to not silently ignore messages on the global 'errorChannel' when they + * Whether to not silently ignore messages on the global 'errorChannel' when there * are no subscribers. */ private boolean requireSubscribers = true; diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc index ede6fca791..6d5af1c10f 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc @@ -150,7 +150,7 @@ If you need the `Mockk` equivalent of the Mockito specific <> into a native image as long at the jar contains the AOT generated assets. +It is possible to convert a Spring Boot <> into a native image as long as the jar contains the AOT generated assets. This can be useful for a number of reasons, including: * You can keep your regular JVM pipeline and turn the JVM application into a native image on your CI/CD platform. @@ -97,7 +97,7 @@ Assuming an AOT processed Spring Boot executable jar built as `myproject-0.0.1-S $ mv myproject ../ ---- -NOTE: These commands work on Linux or MacOS machines, you will need to adapt them for Windows. +NOTE: These commands work on Linux or macOS machines, but you will need to adapt them for Windows. TIP: The `@META-INF/native-image/argfile` might not be packaged in your jar. It is only included when reachability metadata overrides are needed. @@ -151,7 +151,7 @@ For further reading, please see {graal-native-image-docs}/metadata/AutomaticMeta [[native-image.advanced.custom-hints]] === Custom Hints If you need to provide your own hints for reflection, resources, serialization, proxy usage etc. you can use the `RuntimeHintsRegistrar` API. -Create a class that implements the `RuntimeHintsRegistrar` interface, then make appropriate calls to the provided `RuntimeHints` instance: +Create a class that implements the `RuntimeHintsRegistrar` interface, and then make appropriate calls to the provided `RuntimeHints` instance: include::code:MyRuntimeHints[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc index 5fdaf06cc4..4442797b66 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc @@ -33,20 +33,20 @@ The resulting image doesn't contain a JVM, instead the native image is compiled This leads to smaller images. NOTE: The builder used for the images is `paketobuildpacks/builder:tiny`. -It has small footprint and reduced surface attack, but you can also use `paketobuildpacks/builder:base` or `paketobuildpacks/builder:full` to have more tools available in the image if required. +It has small footprint and reduced attack surface, but you can also use `paketobuildpacks/builder:base` or `paketobuildpacks/builder:full` to have more tools available in the image if required. [[native-image.developing-your-first-application.buildpacks.system-requirements]] ==== System Requirements -Docker should be installed, see https://docs.docker.com/installation/#installation[Get Docker] for more details. +Docker should be installed. See https://docs.docker.com/installation/#installation[Get Docker] for more details. https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user[Configure it to allow non-root user] if you are on Linux. NOTE: You can run `docker run hello-world` (without `sudo`) to check the Docker daemon is reachable as expected. Check the {spring-boot-maven-plugin-docs}/#build-image-docker-daemon[Maven] or {spring-boot-gradle-plugin-docs}/#build-image-docker-daemon[Gradle] Spring Boot plugin documentation for more details. -TIP: On MacOS, it is recommended to increase the memory allocated to Docker to at least `8GB`, and potentially add more CPUs as well. -See this https://stackoverflow.com/questions/44533319/how-to-assign-more-memory-to-docker-container/44533437#44533437[Stackoverflow answer] for more details. +TIP: On macOS, it is recommended to increase the memory allocated to Docker to at least `8GB`, and potentially add more CPUs as well. +See this https://stackoverflow.com/questions/44533319/how-to-assign-more-memory-to-docker-container/44533437#44533437[Stack Overflow answer] for more details. On Microsoft Windows, make sure to enable the https://docs.docker.com/docker-for-windows/wsl/[Docker WSL 2 backend] for better performance. @@ -92,7 +92,7 @@ To build the image, you can run the `spring-boot:build-image` goal with the `nat [[native-image.developing-your-first-application.buildpacks.gradle]] ==== Using Gradle The Spring Boot Gradle plugin automatically configures AOT tasks when the GraalVM Native Image plugin is applied. -You should check that your gradle build contains a `plugins` block that includes `org.graalvm.buildtools.native`. +You should check that your Gradle build contains a `plugins` block that includes `org.graalvm.buildtools.native`. As long as the `org.graalvm.buildtools.native` plugin is applied, the `bootBuildImage` task will generate a native image rather than a JVM one. You can run the task using: @@ -158,9 +158,9 @@ To build a native image using the Native Build Tools, you'll need a GraalVM dist You can either download it manually on the {liberica-nik-download}[Liberica Native Image Kit page], or you can use a download manager like SDKMAN!. [[native-image.developing-your-first-application.native-build-tools.prerequisites.linux-macos]] -===== Linux and MacOS +===== Linux and macOS -To install the native image compiler on MacOS or Linux, we recommend using SDKMAN!. +To install the native image compiler on macOS or Linux, we recommend using SDKMAN!. Get SDKMAN! from https://sdkman.io and install the Liberica GraalVM distribution by using the following commands: [source,shell,indent=0,subs="verbatim,attributes"] @@ -221,7 +221,7 @@ The native image executable can be found in the `build/native/nativeCompile` dir [[native-image.developing-your-first-application.native-build-tools.running]] ==== Running the Example -At this point, your application should work, you can now start the application by running it directly: +At this point, your application should worK. You can now start the application by running it directly: [source,shell,indent=0,subs="verbatim",role="primary"] .Maven diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/introducing-graalvm-native-images.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/introducing-graalvm-native-images.adoc index 7c7db5f77d..e76ba9d60e 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/introducing-graalvm-native-images.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/introducing-graalvm-native-images.adoc @@ -27,7 +27,7 @@ The main differences are: * There is no lazy class loading, everything shipped in the executables will be loaded in memory on startup. * There are some limitations around some aspects of Java applications that are not fully supported. -TIP: The {graal-native-image-docs}/metadata/Compatibility/[Native Image Compatibility Guide] section of the GraalVM reference documentation provide more details about GraalVM limitations. +TIP: The {graal-native-image-docs}/metadata/Compatibility/[Native Image Compatibility Guide] section of the GraalVM reference documentation provides more details about GraalVM limitations. @@ -126,7 +126,7 @@ TIP: Generated hint files can be found in `target/spring-aot/main/resources` whe Spring sometimes needs to generate proxy classes to enhance the code you've written with additional features. To do this, it uses the cglib library which directly generates bytecode. -When an application is running on the JDK, proxy classes are generated dynamically as the application runs. +When an application is running on the JVM, proxy classes are generated dynamically as the application runs. When creating a native image, these proxies need to be created at build-time so that they can be included by GraalVM. NOTE: Unlike source code generation, generated bytecode isn't particularly helpful when debugging an application. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/testing-native-applications.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/testing-native-applications.adoc index 3eb115412c..434aed5bf3 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/testing-native-applications.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/testing-native-applications.adoc @@ -6,7 +6,7 @@ With broad test coverage on the JVM, you can then focus native image testing on For native image testing, you're generally looking to ensure that the following aspects work: -* The Spring AOT engine is able to process your application and will it run in an AOT-processed mode. +* The Spring AOT engine is able to process your application, and it will run in an AOT-processed mode. * GraalVM has enough hints to ensure that a valid native image can be produced. @@ -39,7 +39,7 @@ If your application starts with the `spring.aot.enabled` property set to `true`, You can also consider running integration tests against the running application. For example, you could use the Spring `WebClient` to call your application REST endpoints. -Or you might consider using a project like Selenium to check your applications HTML responses. +Or you might consider using a project like Selenium to check your application's HTML responses. @@ -59,7 +59,7 @@ You can also use Spring Boot <