springboot热部署

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

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值