Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 24127ca

Browse files
committed
Fix gradle bootRun AOT documentation
Closes gh-1394
1 parent a9c93cd commit 24127ca

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

spring-native-docs/src/main/asciidoc/build-setup.adoc

+25-18
Original file line numberDiff line numberDiff line change
@@ -249,26 +249,33 @@ You can set such a property when running an executable Jar from the command line
249249
java -DspringAot=true -jar myapplication-0.0.1-SNAPSHOT.jar
250250
----
251251

252-
When running an application with the https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#running-your-application-passing-system-properties[Spring Boot Gradle plugin]:
252+
For running an application with `gradle bootRun` or `mvn spring-boot:run`:
253253

254-
[source,bash,subs="attributes,verbatim"]
254+
[source,xml,subs="attributes,verbatim",role="primary"]
255+
.Maven
255256
----
256-
./gradlew bootRun -PspringAot=true
257-
./gradlew check -PspringAot=true
257+
<plugin>
258+
<groupId>org.springframework.boot</groupId>
259+
<artifactId>spring-boot-maven-plugin</artifactId>
260+
<configuration>
261+
<!-- ... -->
262+
<systemPropertyVariables>
263+
<springAot>true</springAot>
264+
</systemPropertyVariables>
265+
</configuration>
266+
</plugin>
258267
----
259-
260-
Or configure the Spring Boot Maven plugin for `./mvnw spring-boot:run`:
261-
262-
[source,xml,subs="attributes,verbatim"]
268+
[source,subs="attributes,verbatim",role="secondary"]
269+
.Gradle Groovy
263270
----
264-
<plugin>
265-
<groupId>org.springframework.boot</groupId>
266-
<artifactId>spring-boot-maven-plugin</artifactId>
267-
<configuration>
268-
<!-- ... -->
269-
<systemPropertyVariables>
270-
<springAot>true</springAot>
271-
</systemPropertyVariables>
272-
</configuration>
273-
</plugin>
271+
bootRun {
272+
systemProperty 'springAot', 'true'
273+
}
274+
----
275+
[source,Kotlin,subs="attributes,verbatim",role="secondary"]
276+
.Gradle Kotlin
277+
----
278+
tasks.getByName<BootRun>("bootRun") {
279+
systemProperty("springAot", "true")
280+
}
274281
----

0 commit comments

Comments
 (0)