I created a Spring Boot Gradle project that uses Thymeleaf. My IDE is IntelliJ. I created the application.properties application in the root folder with:
spring.resources.cache-period=0 spring.thymeleaf.cache=false spring.thymeleaf.mode=LEGACYHTML5
But for some reason this is not autoload yet. First I have to click the "Make Project" button. I have another project with the same configuration (not sure about IntelliJ settings), which, oddly enough, works when upgrading.
My .properties applications are being read since I can pull out a custom property using the @Value annotation.
For reference, my build.gradle
buildscript { ext { springBootVersion = '1.3.1.RELEASE' } repositories { mavenCentral() jcenter() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") classpath("org.springframework:springloaded:1.2.5.RELEASE") } } apply plugin: 'spring-boot' apply plugin: 'java' apply plugin: 'idea' sourceCompatibility = 1.8 targetCompatibility = 1.8 idea { module { inheritOutputDirs = false outputDir = file("$buildDir/classes/main/") } } jar { baseName = 'earthalive' version = "" } repositories { mavenCentral() } dependencies { compile('org.springframework.boot:spring-boot-starter-web') compile('org.springframework.boot:spring-boot-starter-thymeleaf') testCompile('org.springframework.boot:spring-boot-starter-test') compile('net.sourceforge.nekohtml:nekohtml:1.9.22') } task wrapper(type: Wrapper) { gradleVersion = '2.9' }
Ideas?
source share