温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

springboot+freemarker热部署

发布时间:2020-07-01 13:37:04 来源:网络 阅读:778 作者:铁牛2020 栏目:软件技术

springboot+freemarker热部署

1.在pom文件中添加

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
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

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI