A tool that can hot swap the class byte code while jvm is running. Very suitable for SpringBoot framework
.
Based on the jvm instrumentation tech, javassist lib, JVMTI.
Download the zip file from the release page.
Make sure you have a JDK >= 1.8.
$ unzip swapper-<latest-version>.zip
$ java -jar swapper.jar
// All of the java processes will be listed in following
// Choose the pid you want to attach
// Then a web ui will be served at http://localhost:8000
Visit this url http://localhost:8000
then you will get the following Web UI.
Now you can enjoy the functionalities of swapper tool.
For example, Watch
some methods
Trigger this method, and then the params and return value and execution time cost will be printed.
It's Watch
one of the functions provided by swapper tool.
Get more functions and details from the wiki.