SpringBoot默认不支持JSP的实时更新。
application.yml 配置如下:
server:
jsp-servlet:
init-parameters:
使用热部署工具,自动开启实时编译JSP的功能。
在pom.xml 增加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
目前有两种解决方案:
application.yml 配置如下:
server:
jsp-servlet:
init-parameters:
development: true
使用热部署工具,自动开启实时编译JSP的功能。
在pom.xml 增加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
本文介绍了SpringBoot中实现JSP实时更新的两种方法:一是通过配置文件手动开启功能;二是利用热部署工具自动实现。提供了具体的配置示例。

被折叠的 条评论
为什么被折叠?



