简体   繁体   English

如何在Spring Boot项目的Intellij IDEA上正确配置jRebel:

[英]How to properly configure jRebel on Intellij IDEA on a spring boot project:

I remember using jRebel on a non-boot spring project with eclipse and it just worked. 我记得在带有eclipse的非启动spring项目上使用jRebel,它刚刚起作用。 I just got the plugin from eclipse's marketplace, installed, restarted the IDE and added the license. 我只是从eclipse的市场上获得了插件,安装了它,重新启动了IDE并添加了许可证。 No tweaks, no registry dabbling, nothing. 没有任何调整,没有注册表打扰,什么也没有。 It just worked. 它只是工作。

I am using Intellij IDEA now on a spring boot project and would like to give jRebel a go. 我现在在春季启动项目上使用Intellij IDEA,并且想尝试一下jRebel。 I know it should just work like in eclipse, except it doesn't appear to do so. 我知道它应该像在eclipse中一样工作,除非它似乎没有这样做。

I've tried using the idea described in this post: 我试过使用这篇文章中描述的想法:

https://dzone.com/articles/spring-boot-application-live-reload-hot-swap-with https://dzone.com/articles/spring-boot-application-live-reload-hot-swap-with

What I am expecting is, when I change the code, switch to the browser and hit refresh (F5), some jRebel messages on the IDE's console. 我期望的是,当我更改代码时,切换到浏览器并单击刷新(F5),在IDE控制台上显示一些jRebel消息。 I get nothing. 我什么都没有。

I know mine is really vague question, but does this seems familiar to anyone? 我知道我的问题确实很模糊,但这对任何人来说都很熟悉吗? How to solve it? 怎么解决呢?

What I know for sure is the idea described in this article https://dzone.com/articles/spring-boot-application-live-reload-hot-swap-with is NOT a jrebel hot swap. 我可以确定的是,本文https://dzone.com/articles/spring-boot-application-live-reload-hot-swap-with中描述的想法不是jrebel热插拔。 It is entire restart of the application. 这是应用程序的整个重启。 After changing the code if you see application restart logs in your console then you are good. 更改代码后,如果您在控制台中看到应用程序重新启动日志,那么您感觉很好。

If you do not see the restart logs, then most probably the issue is your project is not auto compiled. 如果看不到重启日志,则很可能是您的项目没有自动编译。 Please try following this in intellij https://www.mkyong.com/intellij/intellij-idea-how-to-build-project-automatically/ 请尝试在Intellij https://www.mkyong.com/intellij/intellij-idea-how-to-build-project-automatically/

Update: 更新:

It looks like if Jrebel is enabled, auto restart may not work. 似乎如果启用了Jrebel,则自动重启可能无法工作。 So try disabling Jrebel as well. 因此,也请尝试禁用Jrebel。

https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-restart https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-restart

The main difference between eclipse and IntelliJ from the point of JRebel is that IntelliJ does not compile classes on save, because it saves java files constantly. 从JRebel的角度来看,eclipse和IntelliJ之间的主要区别在于IntelliJ不会在保存时编译类,因为它会不断保存Java文件。

For this reason you will need to run Make Project(Ctrl+F9) for JRebel to be able to pick up changes. 因此,您将需要运行Make Project(Ctrl + F9)以便JRebel能够提取更改。

If you are still not seeing changes being reloaded then the fastest way to get your issue resolved is to submit a support ticket (after reproducing the change that didn't reload) via IntelliJ Help->JRebel->Submit a Support Ticket 如果仍然看不到更改正在重新加载,那么解决问题的最快方法是通过IntelliJ帮助-> JRebel->提交支持票证(在重现未重新加载的更改后)
Make sure to attach the jrebel.log and provide details on what was changed(file name and possible code snippets), what the expected is and whether you see any errors/messages. 确保附上jrebel.log并提供有关更改内容(文件名和可能的代码段),预期结果以及是否看到任何错误/消息的详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在IntelliJ IDEA中为Spring Boot项目构建jar工件 - How to build the jar artifact for a Spring Boot project in IntelliJ IDEA 如何在 Intellij Idea 中为 Spring Boot 项目构建 jar 文件? - How to build jar file for Spring Boot project in Intellij Idea? 带有 Angular 和 Spring Boot 的 IntelliJ IDEA 项目 - IntelliJ IDEA Project with Angular and Spring Boot 对 Spring Boot 项目的 IntelliJ IDEA 持久化支持 - IntelliJ IDEA persistence support for Spring Boot project 如何在 Intellij IDEA 中使用 JRebel 进行调试 - How can I debug with JRebel in Intellij IDEA 如何在 IntelliJ IDEA 中配置新的 Maven 项目? - How to configure new Maven project in IntelliJ IDEA? 如何在 Intellij IDEA 社区版本中为 gradle spring boot 项目设置 spring.config.location? - how to set spring.config.location for a gradle spring boot project in Intellij IDEA community version? 如何在 IntelliJ 中配置 Spring Boot Run Configuratipon - How to configure Spring Boot Run Configuratipon in IntelliJ IntelliJ IDEA生成的Spring Boot项目工件会导致错误 - Artifact of Spring Boot project generated by IntelliJ IDEA causes errors 在初始化 Spring Boot 项目 IntelliJ 想法时,它要求选择依赖项 - while initialize the spring boot project IntelliJ idea it is asking to select the dependency
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM