Further maven module restructure
This commit is contained in:
23
spring-cli/samples/web.groovy
Normal file
23
spring-cli/samples/web.groovy
Normal file
@@ -0,0 +1,23 @@
|
||||
@Controller
|
||||
class Example {
|
||||
|
||||
@Autowired
|
||||
private MyService myService;
|
||||
|
||||
@RequestMapping("/")
|
||||
@ResponseBody
|
||||
public String helloWorld() {
|
||||
return myService.sayWorld();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Service
|
||||
class MyService {
|
||||
|
||||
public String sayWorld() {
|
||||
return "World!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user