Just read some source code from Spring-web-4.2.4, found that the ControllerAdvice
(annotation) is pretty interesting:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface ControllerAdvice {
@AliasFor("basePackages")
String[] value() default {};
@AliasFor("value")
String[] basePackages() default {};
//......
}
I do not consider default {}
as the new feature of Java 8?