- All Implemented Interfaces:
- ConfigurableRule<com.sun.codemodel.JCodeModel,com.sun.codemodel.JDefinedClass,ApiResourceMetadata>, Rule<com.sun.codemodel.JCodeModel,com.sun.codemodel.JDefinedClass,ApiResourceMetadata>
public class Spring4ControllerStubRule
extends SpringControllerStubRule
A code generation Rule that provides a simple Controller stub class with Spring4 annotations and empty method bodies.
This is the default code generation rule formally executed by the RamlGenerator.generateClassForRaml(...) method.
A raml endpoint called /people for example would generate an artefact like this:
@RestController
@RequestMapping("/people")
class PeopleController {
@RequestMapping(value="", method=RequestMethod.GET)
public ResponseEntity getPeople() {
return null; // TODO Autogenerated Method Stub. Implement me please.
}
}
After code generation the user has to implement the method bodies.
So this solution is mainly usefull for one time code generation.
- Since:
- 0.4.1
- Author:
- armin.weisser