Skip to content

Application restarts twice on reload when both a class and property files changed  #25269

@arikanorh

Description

@arikanorh

This might be a Intellij specific problem but;

  1. Include dev tools in pom.xml

  2. Set On Update Action as "Update classes and resources"
    image

  3. Run application

  4. Change a property file and a class file

  5. Hit "Update"
    image

Application restarts then restarts again

`2021-02-13 21:40:08.127 DEBUG 8796 --- [ restartedMain] o.s.boot.devtools.restart.Restarter : Creating new Restarter for thread Thread[main,5,main]
2021-02-13 21:40:08.127 DEBUG 8796 --- [ restartedMain] o.s.boot.devtools.restart.Restarter : Immediately restarting application
2021-02-13 21:40:08.128 DEBUG 8796 --- [ restartedMain] o.s.boot.devtools.restart.Restarter : Created RestartClassLoader org.springframework.boot.devtools.restart.classloader.RestartClassLoader@4609f98d
2021-02-13 21:40:08.128 DEBUG 8796 --- [ restartedMain] o.s.boot.devtools.restart.Restarter : Starting application com.vebora.starttuptest.StarttuptestApplication with URLs [file:/C:/Users/Qualist-Orhan/workspace-orhan/starttuptest/target/classes/]
2021-02-13 21:40:23.537 DEBUG 8796 --- [ File Watcher] o.s.boot.devtools.restart.Restarter : Restarting application
2021-02-13 21:40:23.540 DEBUG 8796 --- [ Thread-6] o.s.boot.devtools.restart.Restarter : Stopping application
2021-02-13 21:40:23.541 DEBUG 8796 --- [ Thread-6] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@706581df, started on Sat Feb 13 21:40:05 EET 2021
2021-02-13 21:40:24.274 INFO 8796 --- [ Thread-6] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
2021-02-13 21:40:24.278 INFO 8796 --- [ Thread-6] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2021-02-13 21:40:24.389 DEBUG 8796 --- [ Thread-6] o.s.boot.devtools.restart.Restarter : Created RestartClassLoader org.springframework.boot.devtools.restart.classloader.RestartClassLoader@372ee301
2021-02-13 21:40:24.389 DEBUG 8796 --- [ Thread-6] o.s.boot.devtools.restart.Restarter : Starting application

....

2021-02-13 21:40:25.078 INFO 8796 --- [ restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged

================> THEN SECOND RESTART

2021-02-13 21:40:26.482 DEBUG 8796 --- [ File Watcher] o.s.boot.devtools.restart.Restarter : Restarting application
2021-02-13 21:40:26.483 DEBUG 8796 --- [ Thread-9] o.s.boot.devtools.restart.Restarter : Stopping application
2021-02-13 21:40:26.483 DEBUG 8796 --- [ Thread-9] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1d528d3b, started on Sat Feb 13 21:40:24 EET 2021
2021-02-13 21:40:27.417 INFO 8796 --- [ Thread-9] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
2021-02-13 21:40:27.417 INFO 8796 --- [ Thread-9] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2021-02-13 21:40:27.678 DEBUG 8796 --- [ Thread-9] o.s.boot.devtools.restart.Restarter : Created RestartClassLoader org.springframework.boot.devtools.restart.classloader.RestartClassLoader@7564a821
2021-02-13 21:40:27.679 DEBUG 8796 --- [ Thread-9] o.s.boot.devtools.restart.Restarter : Starting application

.....

2021-02-13 21:40:28.156 INFO 8796 --- [ restartedMain] c.v.s.StarttuptestApplication : Started StarttuptestApplication in 0.461 seconds (JVM running for 25.192)
App started :2021-02-13T21:40:28.157
2021-02-13 21:40:28.158 INFO 8796 --- [ restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions