简体   繁体   中英

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. I just got the plugin from eclipse's marketplace, installed, restarted the IDE and added the license. 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. I know it should just work like in eclipse, except it doesn't appear to do so.

I've tried using the idea described in this post:

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. 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. 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/

Update:

It looks like if Jrebel is enabled, auto restart may not work. So try disabling Jrebel as well.

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.

For this reason you will need to run Make Project(Ctrl+F9) for JRebel to be able to pick up changes.

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
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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM