成都创新互联网站制作重庆分公司

springboot+freemarker热部署

springboot+freemarker热部署

网站建设哪家好,找成都创新互联!专注于网页设计、网站建设、微信开发、小程序开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了舒城免费建站欢迎大家使用!

1.在pom文件中添加


org.springframework.boot
spring-boot-devtools
true


org.springframework.boot
spring-boot-maven-plugin

true


2、设置 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、修改IDEA的设置

打开 Settings –> Build-Execution-Deployment –> Compiler,将 Build project automatically.勾上。

4、点击 Help –> Find Action…,或使用快捷键 Ctrl+Shift+A来打开 Registry…,将其中的compiler.automake.allow.when.app.running勾上。

5、重启idea
完成上面的步骤就可以方便使用了。

见: http://www.qchcloud.cn/tn/article/24


当前文章:springboot+freemarker热部署
文章来源:http://cxhlcq.com/article/ieispd.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部