springmavenspring-bootspring-tool-suitespring-loaded

Spring loaded 1.2.5 + Spring Boot 1.3.2. can't seem to get it to work


I came across a video on youtube ( https://www.youtube.com/watch?v=GTrNkhVnJBU ) where it demos Spring Loaded.

I'm trying to duplicate the same behavior but am still unsuccessful so far.

What I'm using:

Spring Tool Suite 3.7.2 Spring Boot 1.3.2-RELEASE Spring loaded 1.2.5-RELEASE Maven version 3.1.0 JDK 1.8.0_71

I tried the same thing as the guy does in the video (except for the versions being more up to date of course) but it doesn't work.

I also tried the "maven plugin" way as described in the spring docs here -> https://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html#howto-reload-springloaded-maven But that also did not work.

I tried changing the versions of spring loaded to 1.2.0 (docs use that version) but that didn't do anything either.

I ran the app in STS itself, and also tried mvn spring-boot:run from command line, but both simply don't get the desired result.

When using mvn spring-boot:run I see that it is attaching the agent:

[INFO] Attaching agents: [C:\Users\ron.m2\repository\org\springframework\springloaded\1.2.5.RELEASE\springloaded-1.2.5.RELEASE.jar]

But changing RequestMappings or method signatures do not get picked up by spring loaded and thus the change is not reflected.

I'm a little out of ideas why I can't get this to work and any help would be greatly appreciated.


Solution

  • Spring loaded does not yet support spring 4.2. See https://github.com/spring-projects/spring-loaded/issues/139

    So you either stick with DevTools which definitely speeds up the development process (although not as fast as spring-loaded), use JRebel (which supports the latest spring version) or downgrade to spring 4.1.