Sometimes in spring, a class marks a lot of annotations.
In fact, Java annotations can be inherited (that is, merging multiple annotations into 1)
such as Springmvc's notes.
@RestController
@RequestMapping ("/person")
Can be merged into one
@PathRestController ("/user")
Implementation is:
Import java.lang.annotation.Documented;
Import Java.lang.annotation.ElementType;
Import java.lang.annotation.Retention;
Import Java.lang.annotation.RetentionPolicy;
Import Java.lang.annotation.Target;
Import Org.springframework.core.annotation.AliasFor;
Import org.springframework.web.bind.annotation.RequestMapping;
Import Org.springframework.web.bind.annotation.RestController;
@Target (Elementtype.type)
@Retention (retentionpolicy.runtime)
@Documented
@RestController
@ Requestmapping public
@interface Pathrestcontroller {
@AliasFor ("path")
string[] Value () default {};
@AliasFor ("value")
string[] path () default {};
}