首页 > 学院 > 开发设计 > 正文

springboot热部署

2019-11-08 03:13:31
字体:
来源:转载
供稿:网友

一:首先如果你用的是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


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表