How to enable hot update of freemarker templates in spring boot?

I am looking for the opportunity to enable hot updating of ftl files on the spring loading platform, so changes to ftl files do not require a restart of the application. I tried the following settings through application.properties,

spring.freemarker.cache=false
spring.freemarker.template_update_delay=0

but still doesn't get to him.

How to enable it using application properties?

thank!

+4
source share
4 answers

Even I ran into the same problem. I tried the discovery in incognito mode. I tried to set the browser cache to false. Nothing succeeded.

Now I copy and paste all the changes that I make to the source ftl in the ftls target folder

enter image description here

+2

SpringBoot maven, . , target/classes/templates, , . .

+1

Build → Build Project, , spring doc , IDE , , . eclipse intelliJ, Build → Build Project

I hope, you

official link https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-property-defaults 20.2 Automatic restart Start restart

0
source

All Articles