I just created a new Spring Boot(2.1.8) Gradle project with Thymeleaf support based on Java 12 using Intellij IDEA Ultimate 2019.2.3.
If I create a boot jar file and execute the jar from the command line then the app works fine. So the code/template and directories should be fine.
However, if I run the app from the IDE template resolving doesn't work. I got the "usual" error:
Error resolving template [auth/login], template might not exist or might not be accessible by any of the configured Template Resolvers
My old projects are working fine. The problem is present only with the projects generated by IDEA 2019.2.3
The automatically generated gradle file looks like this:
plugins {
id 'org.springframework.boot' version '2.1.8.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
I'm trying to figure it out if it is a result of an IDE settings or a problem with the generated gradle build script or something else.