Remove support for Spring Loaded
Closes gh-7978
This commit is contained in:
@@ -2310,9 +2310,8 @@ for other Groovy customization options.
|
||||
=== Fast application restarts
|
||||
The `spring-boot-devtools` module includes support for automatic application restarts.
|
||||
Whilst not as fast a technologies such as http://zeroturnaround.com/software/jrebel/[JRebel]
|
||||
or https://github.com/spring-projects/spring-loaded[Spring Loaded] it's usually
|
||||
significantly faster than a "`cold start`". You should probably give it a try before
|
||||
investigating some of the more complex reload options discussed below.
|
||||
it's usually significantly faster than a "`cold start`". You should probably give it a try
|
||||
before investigating some of the more complex reload options discussed below.
|
||||
|
||||
For more details see the <<using-spring-boot.adoc#using-boot-devtools>> section.
|
||||
|
||||
@@ -2323,78 +2322,6 @@ Modern IDEs (Eclipse, IDEA, etc.) all support hot swapping of bytecode, so if yo
|
||||
change that doesn't affect class or method signatures it should reload cleanly with no
|
||||
side effects.
|
||||
|
||||
https://github.com/spring-projects/spring-loaded[Spring Loaded] goes a little further in
|
||||
that it can reload class definitions with changes in the method signatures. With some
|
||||
customization it can force an `ApplicationContext` to refresh itself (but there is no
|
||||
general mechanism to ensure that would be safe for a running application anyway, so it
|
||||
would only ever be a development time trick probably).
|
||||
|
||||
|
||||
[[howto-reload-springloaded-maven]]
|
||||
==== Configuring Spring Loaded for use with Maven
|
||||
To use Spring Loaded with the Maven command line, just add it as a dependency in the
|
||||
Spring Boot plugin declaration, e.g.
|
||||
|
||||
[source,xml,indent=0]
|
||||
----
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>springloaded</artifactId>
|
||||
<version>1.2.6.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
----
|
||||
|
||||
This normally works pretty well with Eclipse and IntelliJ IDEA as long as they have their
|
||||
build configuration aligned with the Maven defaults (Eclipse m2e does this out of the
|
||||
box).
|
||||
|
||||
|
||||
|
||||
[[howto-reload-springloaded-gradle-and-intellij-idea]]
|
||||
==== Configuring Spring Loaded for use with Gradle and IntelliJ IDEA
|
||||
You need to jump through a few hoops if you want to use Spring Loaded in combination with
|
||||
Gradle and IntelliJ IDEA. By default, IntelliJ IDEA will compile classes into a different
|
||||
location than Gradle, causing Spring Loaded monitoring to fail.
|
||||
|
||||
To configure IntelliJ IDEA correctly you can use the `idea` Gradle plugin:
|
||||
|
||||
[source,groovy,indent=0,subs="verbatim,attributes"]
|
||||
----
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}'
|
||||
classpath 'org.springframework:springloaded:1.2.6.RELEASE'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'idea'
|
||||
|
||||
idea {
|
||||
module {
|
||||
inheritOutputDirs = false
|
||||
outputDir = file("$buildDir/classes/main/")
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
----
|
||||
|
||||
NOTE: IntelliJ IDEA must be configured to use the same Java version as the command line
|
||||
Gradle task and `springloaded` *must* be included as a `buildscript` dependency.
|
||||
|
||||
You can also additionally enable '`Make Project Automatically`' inside IntelliJ IDEA to
|
||||
automatically compile your code whenever a file is saved.
|
||||
|
||||
|
||||
|
||||
[[howto-build]]
|
||||
|
||||
@@ -664,8 +664,7 @@ You might also want to use this useful operating system environment variable:
|
||||
Since Spring Boot applications are just plain Java applications, JVM hot-swapping should
|
||||
work out of the box. JVM hot swapping is somewhat limited with the bytecode that it can
|
||||
replace, for a more complete solution
|
||||
http://zeroturnaround.com/software/jrebel/[JRebel] or the
|
||||
https://github.com/spring-projects/spring-loaded[Spring Loaded] project can be used. The
|
||||
http://zeroturnaround.com/software/jrebel/[JRebel] can be used. The
|
||||
`spring-boot-devtools` module also includes support for quick application restarts.
|
||||
|
||||
See the <<using-boot-devtools>> section below and the
|
||||
@@ -791,8 +790,6 @@ If you find that restarts aren't quick enough for your applications, or you enco
|
||||
classloading issues, you could consider reloading technologies such as
|
||||
http://zeroturnaround.com/software/jrebel/[JRebel] from ZeroTurnaround. These work by
|
||||
rewriting classes as they are loaded to make them more amenable to reloading.
|
||||
https://github.com/spring-projects/spring-loaded[Spring Loaded] provides another option,
|
||||
however it doesn't support as many frameworks and it isn't commercially supported.
|
||||
****
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user