springmvc 组合注解

时间:2022-06-05 21:33:46

组合注解的意思就是一个注解中包含多个注解。在springmvc 的@RestController中,你就可发现.

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Controller
@ResponseBody
public @interface RestController { /**
* The value may indicate a suggestion for a logical component name,
* to be turned into a Spring bean in case of an autodetected component.
* @return the suggested component name, if any
* @since 4.0.1
*/
String value() default ""; }