Controller
ApplicationController
Annotation
- **@RestController
//source code
@org.springframework.web.bind.annotation.RestController
@Controller
@ResponseBody
@Target(value={
TYPE})
@Retention(value=RUNTIME)
@Documented
A convenience annotation that is itself annotated with @Controller and @ResponseBody. Types that carry this annotation are treated as controllers where @RequestMapping methods assume @ResponseBody semantics by default.
- @RequestMapping;
@org.springframework.web.bind.annotation.RequestMapping
@Mapping
@Target(value={
METHOD, TYPE})
@Retention(value=RUNTIME)
@Documented
Annotation for mapping web requests onto methods in request-handling classes with flexible method signatures. Both Spring MVC and Spring WebFlux support this annotation through a RequestMappingHandlerMapping and RequestMappingHandlerAdapter in their respective modules and package structure.
- @Api
@io.swagger.annotations.Api
@Target(value={
TYPE})
@Retention(value=RUNTIME)
@Inherited
Marks a class as a Swagger resource. By default, Swagger-Core will only include and introspect only classes that are annotated with @Api and will ignore other resources (JAX-RS endpoints, Servlets and so on).
- @Autowired
@org.springframework.beans.factory.annotation.Autowired
@Target(value={
ANNOTATION_TYPE, CONSTRUCTOR, FIELD, METHOD, PARAMETER})