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

Commit 481267e

Browse files
committed
Provide IDE documentation for the IDE mode
Document that running application is broken in IDEA when delegated to Gradle. Closes gh-1465
1 parent b61c258 commit 481267e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ This means that running the application or its tests from the IDE or the command
246246
Any application using Spring AOT can use the `springAot` System property in order to use the AOT classes with a regular JVM.
247247
This is mainly useful for debugging purposes in case of issues during native image generation.
248248

249-
NOTE: When AOT more is enabled, Spring Boot Developer Tools are ignored as they are not compatible with an AOT approach.
249+
NOTE: When AOT mode is enabled, Spring Boot Developer Tools are ignored as they are not compatible with an AOT approach.
250250

251251
You can set such a property when running an executable Jar from the command line:
252252

@@ -255,7 +255,15 @@ You can set such a property when running an executable Jar from the command line
255255
java -DspringAot=true -jar myapplication-0.0.1-SNAPSHOT.jar
256256
----
257257

258-
For running an application with `gradle bootRun` or `mvn spring-boot:run`:
258+
==== IDEs
259+
260+
In IDEs, you can specify `-DspringAot=true` when running the application to enable the AOT mode. It requires AOT generation has been invoked before manually via Maven or Gradle.
261+
262+
WARNING: With IntelliJ IDEA Gradle support, be aware running application in AOT mode is broken in IDEA when delegated to Gradle, see https://youtrack.jetbrains.com/issue/IDEA-287067[IDEA-287067] related issue. As a workaround, you can go to "File -> Plugins ... -> Build, Execution, Deployment -> Build tools -> Gradle" and change "Build and run using" from "Gradle" to "IntelliJ IDEA".
263+
264+
==== Plugins
265+
266+
For running an application with `gradle bootRun` or `mvn spring-boot:run`, configure your build as following:
259267

260268
[source,xml,subs="attributes,verbatim",role="primary"]
261269
.Maven

0 commit comments

Comments
 (0)