I downloaded spring-loaded.jar and tried to set it up for IntelliJ but unfortunately it did not work.
So, here is my questions:
1) What needs to be done exactly to set it up? 2) How do I trigger hot-swap?
I downloaded spring-loaded.jar and tried to set it up for IntelliJ but unfortunately it did not work.
So, here is my questions:
1) What needs to be done exactly to set it up? 2) How do I trigger hot-swap?
我认为您正在寻找弹簧加载项目。
如官方文档中所述,您必须在 IntelliJ“运行配置”(运行应用程序的配置 - 它可能是 Java 类或 Tomcat 等 servlet 容器)中添加此 java 代理参数:
-javaagent:<pathTo>/springloaded-{VERSION}.jar
加载此代理后,它会监视*.class
磁盘上的文件并在修改时重新加载它们(例如,通过您的 IDE)。
警告:取决于您的应用程序,特别是如果它包含缓存、启动时初始化的数据...您可能必须编写特定的插件或事件侦听器来重新初始化它们。