Add support for Spring Loaded in Maven and Gradle

Requires Loaded 1.1.5 (or better).

For Maven you can just add springloaded to the dependencies of the
spring-boot plugin (and also set MAVEN_OPTS=-noverify).

For Gradle add springloaded to the build dependencies (-noverify
can be added by the plugin).

In both cases there is also support for adding an arbitrary java agent
via configuration. Samples are provided in
spring-boot-sample-[simple,web-ui].

The ApplicationPlugin is only added if there is no JavaExec task
already present, and additionally it computes its own man class if
none is provided. So "gradle run" and "gradle bootRun" look
superficially similar, but "bootRun" has extra options, including
the agent and Loaded support.

Fixes gh-251, gh-183
This commit is contained in:
Dave Syer
2013-12-27 08:35:19 +00:00
parent f888567c1d
commit 77bac876ce
14 changed files with 463 additions and 34 deletions

View File

@@ -68,7 +68,7 @@ public class MessageController {
return new ModelAndView("redirect:/{message.id}", "message.id", message.getId());
}
@RequestMapping("/foo")
@RequestMapping("foo")
public String foo() {
throw new RuntimeException("Expected exception in controller");
}