55
55
56
56
/**
57
57
* An extension of {@link RequestMappingInfoHandlerMapping} that creates
58
- * {@link RequestMappingInfo} instances from class-level and method-level
59
- * {@link RequestMapping @RequestMapping} annotations.
58
+ * {@link RequestMappingInfo} instances from type-level and method-level
59
+ * {@link RequestMapping @RequestMapping} and {@link HttpExchange @HttpExchange}
60
+ * annotations.
60
61
*
61
62
* @author Rossen Stoyanchev
62
63
* @author Sam Brannen
@@ -84,9 +85,9 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
84
85
/**
85
86
* Configure path prefixes to apply to controller methods.
86
87
* <p>Prefixes are used to enrich the mappings of every {@code @RequestMapping}
87
- * method whose controller type is matched by a corresponding
88
- * {@code Predicate} in the map. The prefix for the first matching predicate
89
- * is used, assuming the input map has predictable order.
88
+ * method and {@code @HttpExchange} method whose controller type is matched
89
+ * by a corresponding {@code Predicate} in the map. The prefix for the first
90
+ * matching predicate is used, assuming the input map has predictable order.
90
91
* <p>Consider using {@link org.springframework.web.method.HandlerTypePredicate
91
92
* HandlerTypePredicate} to group controllers.
92
93
* @param prefixes a map with path prefixes as key
@@ -149,10 +150,11 @@ protected boolean isHandler(Class<?> beanType) {
149
150
}
150
151
151
152
/**
152
- * Uses method and type-level @{@link RequestMapping} annotations to create
153
- * the RequestMappingInfo.
154
- * @return the created RequestMappingInfo, or {@code null} if the method
155
- * does not have a {@code @RequestMapping} annotation.
153
+ * Uses type-level and method-level {@link RequestMapping @RequestMapping}
154
+ * and {@link HttpExchange @HttpExchange} annotations to create the
155
+ * {@link RequestMappingInfo}.
156
+ * @return the created {@code RequestMappingInfo}, or {@code null} if the method
157
+ * does not have a {@code @RequestMapping} or {@code @HttpExchange} annotation
156
158
* @see #getCustomMethodCondition(Method)
157
159
* @see #getCustomTypeCondition(Class)
158
160
*/
@@ -214,7 +216,7 @@ private RequestMappingInfo createRequestMappingInfo(AnnotatedElement element) {
214
216
215
217
/**
216
218
* Protected method to provide a custom type-level request condition.
217
- * The custom {@link RequestCondition} can be of any type so long as the
219
+ * <p> The custom {@link RequestCondition} can be of any type so long as the
218
220
* same condition type is returned from all calls to this method in order
219
221
* to ensure custom request conditions can be combined and compared.
220
222
* <p>Consider extending
@@ -233,7 +235,7 @@ protected RequestCondition<?> getCustomTypeCondition(Class<?> handlerType) {
233
235
234
236
/**
235
237
* Protected method to provide a custom method-level request condition.
236
- * The custom {@link RequestCondition} can be of any type so long as the
238
+ * <p> The custom {@link RequestCondition} can be of any type so long as the
237
239
* same condition type is returned from all calls to this method in order
238
240
* to ensure custom request conditions can be combined and compared.
239
241
* <p>Consider extending
@@ -252,7 +254,7 @@ protected RequestCondition<?> getCustomMethodCondition(Method method) {
252
254
253
255
/**
254
256
* Create a {@link RequestMappingInfo} from the supplied
255
- * {@link RequestMapping @RequestMapping} annotation, or meta-annotation,
257
+ * {@link RequestMapping @RequestMapping} annotation, meta-annotation,
256
258
* or synthesized result of merging annotation attributes within an
257
259
* annotation hierarchy.
258
260
*/
@@ -277,7 +279,7 @@ protected RequestMappingInfo createRequestMappingInfo(
277
279
278
280
/**
279
281
* Create a {@link RequestMappingInfo} from the supplied
280
- * {@link HttpExchange @HttpExchange} annotation, or meta-annotation,
282
+ * {@link HttpExchange @HttpExchange} annotation, meta-annotation,
281
283
* or synthesized result of merging annotation attributes within an
282
284
* annotation hierarchy.
283
285
* @since 6.1
0 commit comments