SpringMVC自定义注解

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@ResponseBody
@Controller
@CrossOrigin
public @interface SuperController {
    /**
     * 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
     */
    String value() default "";
}
  以上包括
@ResponseBody
@Controller
@CrossOrigin
这个三个注解的功能  

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
是java元注解

猜你喜欢

转载自blog.csdn.net/as875784622/article/details/79849136