Skip to content

Commit 14902e1

Browse files
committed
Polish Javadoc
1 parent 517812d commit 14902e1

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,16 +46,16 @@
4646
* <p>Note: For {@code @ExceptionHandler} methods, a root exception match will be
4747
* preferred to just matching a cause of the current exception, among the handler
4848
* 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)
5050
* 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.
5252
*
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
5959
* are performed at runtime and so adding many selectors may negatively impact
6060
* performance and add complexity.
6161
*
@@ -98,8 +98,8 @@
9898
String[] basePackages() default {};
9999

100100
/**
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}
103103
* annotated class.
104104
* <p>Consider creating a special no-op marker class or interface in each package
105105
* that serves no purpose other than being referenced by this attribute.
@@ -110,16 +110,16 @@
110110
/**
111111
* Array of classes.
112112
* <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.
114114
* @since 4.0
115115
*/
116116
Class<?>[] assignableTypes() default {};
117117

118118
/**
119119
* 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,
123123
* like {@link RestController @RestController}.
124124
* @since 4.0
125125
*/

spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,12 +32,12 @@
3232
import org.springframework.web.bind.annotation.ControllerAdvice;
3333

3434
/**
35-
* Encapsulates information about an {@linkplain ControllerAdvice @ControllerAdvice}
35+
* Encapsulates information about an {@link ControllerAdvice @ControllerAdvice}
3636
* Spring-managed bean without necessarily requiring it to be instantiated.
3737
*
3838
* <p>The {@link #findAnnotatedBeans(ApplicationContext)} method can be used to
3939
* discover such beans. However, a {@code ControllerAdviceBean} may be created
40-
* from any object, including ones without an {@code @ControllerAdvice}.
40+
* from any object, including ones without an {@code @ControllerAdvice} annotation.
4141
*
4242
* @author Rossen Stoyanchev
4343
* @author Brian Clozel
@@ -113,7 +113,7 @@ private ControllerAdviceBean(Object bean, @Nullable BeanFactory beanFactory) {
113113

114114

115115
/**
116-
* Returns the order value extracted from the {@link ControllerAdvice}
116+
* Return the order value extracted from the {@link ControllerAdvice}
117117
* annotation, or {@link Ordered#LOWEST_PRECEDENCE} otherwise.
118118
*/
119119
@Override
@@ -146,11 +146,11 @@ private BeanFactory obtainBeanFactory() {
146146
}
147147

148148
/**
149-
* Check whether the given bean type should be assisted by this
150-
* {@code @ControllerAdvice} instance.
149+
* Check whether the given bean type should be advised by this
150+
* {@code ControllerAdviceBean}.
151151
* @param beanType the type of the bean to check
152152
* @since 4.0
153-
* @see org.springframework.web.bind.annotation.ControllerAdvice
153+
* @see ControllerAdvice
154154
*/
155155
public boolean isApplicableToBeanType(@Nullable Class<?> beanType) {
156156
return this.beanTypePredicate.test(beanType);
@@ -181,9 +181,9 @@ public String toString() {
181181

182182

183183
/**
184-
* Find the names of beans annotated with
185-
* {@linkplain ControllerAdvice @ControllerAdvice} in the given
186-
* ApplicationContext and wrap them as {@code ControllerAdviceBean} instances.
184+
* Find beans annotated with {@link ControllerAdvice @ControllerAdvice} in the
185+
* given {@link ApplicationContext} and wrap them as {@code ControllerAdviceBean}
186+
* instances.
187187
*/
188188
public static List<ControllerAdviceBean> findAnnotatedBeans(ApplicationContext context) {
189189
return Arrays.stream(BeanFactoryUtils.beanNamesForTypeIncludingAncestors(context, Object.class))

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -99,7 +99,7 @@
9999

100100
/**
101101
* Extension of {@link AbstractHandlerMethodAdapter} that supports
102-
* {@link RequestMapping} annotated {@code HandlerMethod RequestMapping} annotated {@code HandlerMethods}.
102+
* {@link RequestMapping @RequestMapping} annotated {@link HandlerMethod HandlerMethods}.
103103
*
104104
* <p>Support for custom argument and return value types can be added via
105105
* {@link #setCustomArgumentResolvers} and {@link #setCustomReturnValueHandlers},

0 commit comments

Comments
 (0)