|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2018 the original author or authors. |
| 2 | + * Copyright 2002-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
46 | 46 | * <p>Note: For {@code @ExceptionHandler} methods, a root exception match will be
|
47 | 47 | * preferred to just matching a cause of the current exception, among the handler
|
48 | 48 | * methods of a particular advice bean. However, a cause match on a higher-priority
|
49 |
| - * advice will still be preferred to a any match (whether root or cause level) |
| 49 | + * advice will still be preferred over any match (whether root or cause level) |
50 | 50 | * on a lower-priority advice bean. As a consequence, please declare your primary
|
51 |
| - * root exception mappings on a prioritized advice bean with a corresponding order! |
| 51 | + * root exception mappings on a prioritized advice bean with a corresponding order. |
52 | 52 | *
|
53 |
| - * <p>By default the methods in an {@code @ControllerAdvice} apply globally to |
54 |
| - * all Controllers. Use selectors {@link #annotations()}, |
55 |
| - * {@link #basePackageClasses()}, and {@link #basePackages()} (or its alias |
56 |
| - * {@link #value()}) to define a more narrow subset of targeted Controllers. |
57 |
| - * If multiple selectors are declared, OR logic is applied, meaning selected |
58 |
| - * Controllers should match at least one selector. Note that selector checks |
| 53 | + * <p>By default, the methods in an {@code @ControllerAdvice} apply globally to |
| 54 | + * all controllers. Use selectors {@link #annotations}, |
| 55 | + * {@link #basePackageClasses}, and {@link #basePackages} (or its alias |
| 56 | + * {@link #value}) to define a more narrow subset of targeted controllers. |
| 57 | + * If multiple selectors are declared, boolean {@code OR} logic is applied, meaning |
| 58 | + * selected controllers should match at least one selector. Note that selector checks |
59 | 59 | * are performed at runtime and so adding many selectors may negatively impact
|
60 | 60 | * performance and add complexity.
|
61 | 61 | *
|
|
98 | 98 | String[] basePackages() default {};
|
99 | 99 |
|
100 | 100 | /**
|
101 |
| - * Type-safe alternative to {@link #value()} for specifying the packages |
102 |
| - * to select Controllers to be assisted by the {@code @ControllerAdvice} |
| 101 | + * Type-safe alternative to {@link #basePackages} for specifying the packages |
| 102 | + * in which to select controllers to be advised by the {@code @ControllerAdvice} |
103 | 103 | * annotated class.
|
104 | 104 | * <p>Consider creating a special no-op marker class or interface in each package
|
105 | 105 | * that serves no purpose other than being referenced by this attribute.
|
|
110 | 110 | /**
|
111 | 111 | * Array of classes.
|
112 | 112 | * <p>Controllers that are assignable to at least one of the given types
|
113 |
| - * will be assisted by the {@code @ControllerAdvice} annotated class. |
| 113 | + * will be advised by the {@code @ControllerAdvice} annotated class. |
114 | 114 | * @since 4.0
|
115 | 115 | */
|
116 | 116 | Class<?>[] assignableTypes() default {};
|
117 | 117 |
|
118 | 118 | /**
|
119 | 119 | * Array of annotations.
|
120 |
| - * <p>Controllers that are annotated with this/one of those annotation(s) |
121 |
| - * will be assisted by the {@code @ControllerAdvice} annotated class. |
122 |
| - * <p>Consider creating a special annotation or use a predefined one, |
| 120 | + * <p>Controllers that are annotated with at least one of the supplied annotations |
| 121 | + * will be advised by the {@code @ControllerAdvice} annotated class. |
| 122 | + * <p>Consider creating a custom composed annotation or use a predefined one, |
123 | 123 | * like {@link RestController @RestController}.
|
124 | 124 | * @since 4.0
|
125 | 125 | */
|
|
0 commit comments