How to Configure SpringLoaded with Eclipse Dynamic Web Project

The article presents simple steps to use SpringLoaded framework to have your classes loaded onto the tomcat server without you having required to restart the server, while you are working with Eclipse Dynamic Web Project. The instructions below applies when you have installed Tomcat server and added the same to the eclipse.
Quick Introduction on SpringLoaded

SpringLoaded, a framework published by Spring.io, is a JVM agent for reloading class file changes whilst a JVM is running. It transforms classes at loadtime to make them amenable to later reloading. Read further on this github page. Personally, I have found it very useful as I do not have to build and restart servers for every small changes. In many ways, the framework does what is done by popular JRebel.

 

Why use SpringLoaded?
  1. Does not require you to stop and start server after making changes into one or more classes.
  2. In that way, it acts as a productivity booster as one spends significant time in stopping and starting the server if there are minor changes in the Java classes.

 

Steps to Configure SpringLoaded

Step 1: Download the SpringLoaded library from https://github.com/spring-projects/spring-loaded. This is the link of current 1.2 version of SpringLoaded.

Step 2:  Place following as JVM argument in “Run Configuration” as shown in the screenshot below.

-Djavaagent:D:\javalibs\springlibs\springloaded-1.2.0.RELEASE.jar

SpringLoaded configured to run with the tomcat server

SpringLoaded configured to run with the tomcat server

That is it. Let me know if it worked for you.

Ajitesh Kumar
Follow me

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com
Posted in Java. Tagged with , .

One Response

Leave a Reply

Your email address will not be published. Required fields are marked *