Before this change if Layout dialect not available then the nested class is
loaded and barfs because it depended on the layout dialect (in a
@ConditionalOnClass annotation).
E.g.
options {
option "foo", "Foo set"
option "bar", "Bar has an argument of type int"
withOptionalArg() ofType Integer
}
println "Hello ${options.nonOptionArguments()}: " +
"${options.has('foo')} ${options.valueOf('bar')}"
[#50427095] [bs-135] Plugin model for spring commands
* Added CommandFactory and a ServiceLoader model for providing
implementations
* Added ScriptCommand (wrapping groovy script). Service providers
are recommended to implement OptionHandler in their script, but a
regulare Script or a Runnable will also work.
[#50427095]
Moved the Grab.addResolver() call to before any other compiler
customizations.
That got it working locally (removed ~/.m2 and ~/.groovy/grapes)
but still not working on cloudfoundry for some reason. We need
more help from buildpacks there (to get a cache going for the
grapes), but there seems to be more than just that stopping it
(maybe just timeouts?).
[#50351963]
* Added GroovyTemplate.template() utility and static import in webapp CLI, so
@RequestMapping("/")
@ResponseBody
String home(Model model) {
template "home.html", model
}
renders the template in /templates/home.html
[Fixes#49832753]
* Because Spring is not on the classpath we don't particularly
want to use SpringFactoriesLoader
* Adopted the JDK (>=6) ServiceLoader model instead
[Fixes#48789783]
* The TraceAutoConfiguration in the service project
was loading too early because it contains a BPP
* It also had a Spring Security dependency without any
@Conditional* configuration
* Fixed by nesting the BPP in a class with @Conditional*
* Use file adapters in sample instead of internal flow
* Add Exception to signature of CommandLineRunner for
implementation convenience
* Updates for Security snapshots
$ cd spring-bootstrap-cli
$ export SPRING_HOME=target
$ src/main/scripts/spring run samples/integration.groovy
The big disadvantage at the moment is that there is no goo way to
detect Spring Integration in the AST (at least not as good as @Enable*).
So for now we are looking for @MessageEndpoint or a class name with
SpringIntegration in it.
[#48151147]
* Added a test for each of the classes loaded by the SpringApplication
* If it's an anonymous class or looks like a Groovy closure we ignore it
* The CLI sample job.groovy also modified to take advantage
[Fixes#48718891]
We could take this out again when we decide what to do about plugins
but it's good to have it in for now because it shows how to do it,
and exposes some holes. The job.groovy script now works, but
a lot of it should be defaulted through auto-configuration.
(See also [bs-73] for a non-Batch related bug.)
[#48716881]
* Also added "spring" shell script (in zip), so you can
unzip it and run out of the box
* To run in developer mode use SPRING_HOME, e.g.
$ cd spring-bootstrap-cli
$ SPRING_HOME=target src/main/scripts/spring run samples/web.groovy
* Also added "clean" command to remove spring bootstrap grapes
(useful to force a refresh of snapshot jars)
[#48644271]