Fast forward existing prototype work

This commit is contained in:
Dave Syer
2013-04-24 10:02:07 +01:00
parent 80b151e2b3
commit fb6b224470
294 changed files with 23494 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package org.test
@GrabResolver(name='spring-milestone', root='http://repo.springframework.org/milestone')
@GrabResolver(name='spring-snapshot', root='http://repo.springframework.org/snapshot')
@Grab("org.springframework.bootstrap:spring-bootstrap:0.0.1-SNAPSHOT")
@Grab("org.springframework:spring-context:4.0.0.BOOTSTRAP-SNAPSHOT")
@org.springframework.bootstrap.context.annotation.EnableAutoConfiguration
@org.springframework.stereotype.Component
class Example implements org.springframework.bootstrap.CommandLineRunner {
@org.springframework.beans.factory.annotation.Autowired
private MyService myService;
public void run(String... args) {
print "Hello " + this.myService.sayWorld();
}
}
@org.springframework.stereotype.Service
class MyService {
public String sayWorld() {
return "World!";
}
}

View File

@@ -0,0 +1,24 @@
@org.springframework.bootstrap.context.annotation.EnableAutoConfiguration
@Controller
class Example {
@Autowired
private MyService myService;
@RequestMapping("/")
@ResponseBody
public String helloWorld() {
return myService.sayWorld();
}
}
@Service
class MyService {
public String sayWorld() {
return "World!";
}
}