一:首先如果你用的是thymeleaf模板可能是以下情况
二:修改java文件需要重启服务才能生效问题
1:在myeclipse下
1):点击下载springloaded-1.2.3.RELEASE.jar 或下载更高版本
2):点击
3):点击java Application---->HelloController---->Arguments 填写 springloaded-1.2.3.RELEASE.jar路径“-javaagent:C:\Users\springloaded-1.2.3.RELEASE.jar -noverify”
点击run 即可运行项目,再次修改java文件即时生效
2:热启动 pom中直接添加依赖即可(非myeclipse):
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
3:
热交换或热部署
使用springloaded插件(非myeclipse)
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<!-- spring热部署 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.6.RELEASE</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
使用spring-boot:run