新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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://www.wjwzjz.com/article/ieispd.html
在线咨询
服务热线
服务热线:028-86922220
TOP