spring-loaded icon indicating copy to clipboard operation
spring-loaded copied to clipboard

Gradle + Boot + SpringLoaded = confusion

Open marcDeSantis opened this issue 10 years ago • 2 comments

I've been trying to get hot swapping to work with Gradle, Spring Boot and Spring Loaded for three days.

First, I followed the directions for IntelliJ with no luck. Server starts, I change a domain object and nothing happens. http://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html#howto-reload-springloaded-gradle-and-intellij

I then tried the same approach as above, but on the command line using gradle bootRun. Same results.

I attempted to get it working in Eclipse and quickly remembered why I stopped using Eclipse.

As a final attempt, I ran gradle bootRun -javaagent:<path-to>/springloaded-1.2.3.RELEASE.jar -noverify which failed with > Unknown command-line option '-j'.

Are there known problems with the approach I am taking, or is there something I am missing?

marcDeSantis avatar Mar 20 '15 18:03 marcDeSantis

You shouldn't pass -javaagent to bootRun via cmdline. spring boot plugin should automatically detect if spring-loaded is present.

I've tried to document setup for jhipster-loaded: https://github.com/jhipster/jhipster-loaded/wiki/Usage Plain spring-loaded configuration should be similar (of course you would remove jhipster specific libs and properties - the ones that start with hotReload). It should give you a hint how to setup your gradle.

ilx avatar Mar 22 '15 10:03 ilx

http://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html#howto-reload-springloaded-gradle-and-intellij

Since this link no longer works - you can replace current with the version of the spring plugin youre using: https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/html/howto-hotswapping.html

StefanLobbenmeier avatar Oct 22 '19 11:10 StefanLobbenmeier