Hot deployment of springboot+freemarker
Hot deployment of springboot+freemarker
1. Add to the pom file
Org.springframework.boot
Spring-boot-devtools
True
Org.springframework.boot
Spring-boot-maven-plugin
True
2. Set freeemarker.cache=false
SPRING PROFILES
Spring:
Freemarker:
Allow-request-override: false
Allow-session-override: false
Cache: false
Charset: UTF-8
Check-template-location: true
Content-type: text/html
Enabled: true
Expose-request-attributes: false
Expose-session-attributes: false
Expose-spring-macro-helpers: true
Prefer-file-system-access: true
Suffix: .ftl
Template-loader-path: classpath:/templates/
Settings:
Template_update_delay: 0
Default_encoding: UTF-8
Classic_compatible: true
3. Modify the settings of IDEA
Open Settings-> Build-Execution-Deployment-> Compiler, and Build project automatically. Check it.
4. Click Help-> Find Action... , or use the shortcut key Ctrl+Shift+A to open Registry. And check the compiler.automake.allow.when.app.running in it.
5. Restart idea
After completing the above steps, it is easy to use.
See: http://www.qchcloud.cn/tn/article/24