From 2999f09a409675bb53fce63715de3becc65d920c Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 22 Sep 2020 16:44:16 +0200 Subject: [PATCH] Rework tip on templates location in the IDE This commit rework the tip on locating templates when running the app in the IDE. Using classpath* should not change anything as this won't make a difference without a pattern in the path. Closes gh-23068 --- .../src/main/asciidoc/spring-boot-features.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 6d934db5f8..d745b5d70a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2337,11 +2337,10 @@ There are several <> when usin When you use one of these templating engines with the default configuration, your templates are picked up automatically from `src/main/resources/templates`. -TIP: Depending on how you run your application, IntelliJ IDEA orders the classpath differently. +TIP: Depending on how you run your application, your IDE may order the classpath differently. Running your application in the IDE from its main method results in a different ordering than when you run your application by using Maven or Gradle or from its packaged jar. -This can cause Spring Boot to fail to find the templates on the classpath. +This can cause Spring Boot to fail to find the expected template. If you have this problem, you can reorder the classpath in the IDE to place the module's classes and resources first. -Alternatively, you can configure the template prefix to search every `templates` directory on the classpath, as follows: `classpath*:/templates/`.