@Service
, @Autowired
, @GetMapping
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAnnotation {}
@Target
, @Retention
: 메타 애노테이션(meta-annotation)@MyAnnotation
: 커스텀 애노테이션(custom annotation)@RestController
는 사실 @Controller
+ @ResponseBody
가 합쳐진 메타 애노테이션
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Controller
@ResponseBody
public @interface RestController {}