Close
« Tutorial

Spring MVC - Meta Annotations MCQ

0/13
0 ✓
0 ✗

1. What is a meta-annotation in Java?

2. Which of these annotations is a meta-annotation that you can place on another annotation?

3. Do you need a special declaration to make an annotation a meta-annotation?

4. What is the main purpose of using meta-annotations in Spring?

5. What is a benefit of creating your own annotation from several Spring annotations?

6. Which Spring MVC annotations are good examples of annotations built with meta-annotations?

7. Do you need to write a custom annotation processor for an annotation that is meta-annotated with Spring annotations?

8. A custom annotation is meta-annotated with Spring annotations and is used on a method. How does Spring treat it?

9. You want a custom annotation to set a fixed HTTP response status on handler methods. Which Spring annotation can you add to it as a meta-annotation?

10. What does the following custom annotation do when it is placed on a controller method?

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public @interface JsonGet {
}

11. What is the purpose of @AliasFor in a custom annotation that is meta-annotated with another annotation?

Join