Which attribute will be assigned without writing the attribute name when using java annotation

  java, question

such as
public @interface RequestMapping {
String name() default “”;
Full stop
Full stop
Full stop

@ requestmapping (name = “XXX”, value = “XXX”) is understandable, but @RequestMapping(“/ “) does not understand who is assigned the value, which is the first by default.

The default is to assign a value to an attribute named “value.”


If there is just one element named value, then the name can be omitted.