spring-boot/spring-bootstrap-cli/samples/service.groovy
Dave Syer 83e0ea22c1 [bs-19] Add samples and CLI support for Spring Integration
$ 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]
2013-04-25 17:15:05 +01:00

16 lines
230 B
Groovy

package org.test
@Grab("org.springframework.bootstrap:spring-bootstrap-service:0.0.1-SNAPSHOT")
@Controller
class SampleController {
@RequestMapping("/")
@ResponseBody
public def hello() {
[message: "Hello World!"]
}
}