Spring Boot – How to Reload Changes Without Restarting the Server

Spring-Boot-Tutorials » on Dec 8, 2017 { 8 Comments } By Sivateja

One of the main challenge for the java developers is to deploy the apps and restart server when ever there is a code change. In this article, I am going to show you how to reload the code changes without having to restart the server. In Spring Boot this can be achieved by adding a DevTools module, just add the following dependency in your Spring Boots pom.xml and build it. 


Spring Boot DevTools module does exactly what developers needed, this eliminates the process of manually deploying the changes. DevTools will auto restart the server when we have changes. Spring team they haven’t included this feature in Spring Boot’s initial version, upon several request they added this feature later.

Final pom.xml looks like

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">

You can start the server and run the application. Now if you do some code changes to your project files, you no need to restart the server again to view the changes rather just refresh your browser 😉 that’s it.

Hope your enjoy this article, you can download the complete example by clicking on download button.


You Might Also Like

  ::. About the Author .::

Sivateja Kandula - Java/J2EE Full Stack Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.


8 Responses to “Spring Boot – How to Reload Changes Without Restarting the Server”
  1. sundip says:

    super mama . chala help avtondi.

  2. Swapna says:

    But it didn't reflected in my application even I refreshed the browser.

  3. jagan says:

    Hi Siva,

    I have read the Spring Boot Article its was very Nice

    But I have a small doubt,spring BOOT provided inbuilt server like tomcat, GlassFish etc
    so,spring boot application move to production server there we are using different application server ,like WebLogic some diff, any changes in need do to in spring Boot or not?

  4. Sudhir says:

    One of the best site for learning Spring Boot I got. I really enjoying after learning all the pages.

    It a fantastic tutorial.As a spring MVC developer , I can understand how spring boot made life easy.

    Great work dude.
    All the best for you.

  5. Anthony says:

    Hey Team, I actuallly know the behaviour of dev tools spring boot dependency jar. It tries to keep on restrating the server as soon as changes are made in any callpath file or application .properties file. But my question here is i dont to restart the server, but changes need to be deployed. Which is not working with the thing you provide above. Please correct me if am wrong.

    Thanks in advance.

  6. Mareswara Rao says:

    Hi Siva,

    Im getting below error while running the application(run>java application) after adding devtoools dependency in pom.xml

    Exception in thread "main" java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class (jdk.internal.loader.ClassLoaders$AppClassLoader and are in module java.base of loader 'bootstrap')
    at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(
    at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(
    at org.springframework.boot.devtools.restart.Restarter.<init>(
    at org.springframework.boot.devtools.restart.Restarter.initialize(
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(
    at org.springframework.boot.context.event.EventPublishingRunListener.starting(
    at org.springframework.boot.SpringApplicationRunListeners.starting(

  7. madhu says:

    This feature is not working in my local


By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Spring Boot Hibernate Spring
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2024 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.