springboot使用热加载神奇插件jrebel,不需重构建/运行项目即可实时更改查看更改后效果

Posted 整理是一切的开始

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springboot使用热加载神奇插件jrebel,不需重构建/运行项目即可实时更改查看更改后效果相关的知识,希望对你有一定的参考价值。

 

 

 

2020-05-06 12:21:09.502  INFO 2872 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9090 (http) with context path \'\'
2020-05-06 12:21:09.508  INFO 2872 --- [           main] com.example.demo1.Demo1Application       : Started Demo1Application in 5.375 seconds (JVM running for 16.488)
2020-05-06 12:25:01 JRebel: Reloading class \'com.example.demo1.Demo1Application\'.
2020-05-06 12:25:01 JRebel: Reinitialized class \'com.example.demo1.Demo1Application$$EnhancerBySpringCGLIB$$dfb5d3d2\'.
2020-05-06 12:25:02 JRebel: Reconfiguring bean \'demo1Application\' [com.example.demo1.Demo1Application$$EnhancerBySpringCGLIB$$dfb5d3d2]
2020-05-06 12:25:02 JRebel: Reconfiguring bean \'demo1Application\' [com.example.demo1.Demo1Application$$EnhancerBySpringCGLIB$$dfb5d3d2]
2020-05-06 12:25:05.661  INFO 2872 --- [nio-9090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet \'dispatcherServlet\'
2020-05-06 12:25:05.661  INFO 2872 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet \'dispatcherServlet\'
2020-05-06 12:25:05.677  INFO 2872 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 16 ms
2020-05-06 12:25:15 JRebel: Reloading class \'com.example.demo1.Demo1Application\'.
2020-05-06 12:25:15 JRebel: Reinitialized class \'com.example.demo1.Demo1Application$$EnhancerBySpringCGLIB$$dfb5d3d2\'.
2020-05-06 12:25:17 JRebel: Reconfiguring bean \'demo1Application\' [com.example.demo1.Demo1Application$$EnhancerBySpringCGLIB$$dfb5d3d2]
    @GetMapping("")
    public String test(){
        return "test123";
    }

页面展示test123

    @GetMapping("")
    public String test(){
        return "test";
    }

页面展示test

 

激活方式

https://www.guidgen.com/ 

将在上面链接出生成获取的字符串连接到

https://jrebel.qekang.com/

** 2020-6-27已经过期

方法使用:http://www.xiwenblog.com/archives/1965

 

 

 

 记得点work offline,最终如上,便不再远程检测是否激活

后面

https://jrebel.qekang.com/d6ca6cc4-370a-432e-8d21-4fa86f7f5c7c

作为激活url,邮箱自己填写 点击激活

 

设置idea的Build project automatically勾选

ctrl+shift+alt+/

点击

registry

 

勾选上面选项

 

以上是关于springboot使用热加载神奇插件jrebel,不需重构建/运行项目即可实时更改查看更改后效果的主要内容,如果未能解决你的问题,请参考以下文章

在 IDEA 中使用 JRebel 实现 SpringBoot 热部署

热部署简介及在eclipse安装插件JRebel进行热部署

热部署只知道devtools吗?JRebel不香吗?

推荐IntelliJ IDEA插件JRebel,支持Java项目热更新,省去不断重启服务的烦恼

热部署插件JRebel的安装和使用

Eclipse中使用JRebel实现项目热部署(Maven插件版)