Skip to content

Commit 9bf5cba

Browse files
committed
Drop outdated notes on handler type versus handler method restrictions
Closes gh-25482
1 parent 7d56c30 commit 9bf5cba

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

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

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -67,8 +67,6 @@
6767
* @see PutMapping
6868
* @see DeleteMapping
6969
* @see PatchMapping
70-
* @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
71-
* @see org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter
7270
*/
7371
@Target({ElementType.TYPE, ElementType.METHOD})
7472
@Retention(RetentionPolicy.RUNTIME)
@@ -120,9 +118,8 @@
120118
* The HTTP request methods to map to, narrowing the primary mapping:
121119
* GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE, TRACE.
122120
* <p><b>Supported at the type level as well as at the method level!</b>
123-
* When used at the type level, all method-level mappings inherit
124-
* this HTTP method restriction (i.e. the type-level restriction
125-
* gets checked before the handler method is even resolved).
121+
* When used at the type level, all method-level mappings inherit this
122+
* HTTP method restriction.
126123
*/
127124
RequestMethod[] method() default {};
128125

@@ -136,13 +133,8 @@
136133
* any value). Finally, "!myParam" style expressions indicate that the
137134
* specified parameter is <i>not</i> supposed to be present in the request.
138135
* <p><b>Supported at the type level as well as at the method level!</b>
139-
* When used at the type level, all method-level mappings inherit
140-
* this parameter restriction (i.e. the type-level restriction
141-
* gets checked before the handler method is even resolved).
142-
* <p>Parameter mappings are considered as restrictions that are enforced at
143-
* the type level. The primary path mapping (i.e. the specified URI value)
144-
* still has to uniquely identify the target handler, with parameter mappings
145-
* simply expressing preconditions for invoking the handler.
136+
* When used at the type level, all method-level mappings inherit this
137+
* parameter restriction.
146138
*/
147139
String[] params() default {};
148140

@@ -162,9 +154,8 @@
162154
* </pre>
163155
* will match requests with a Content-Type of "text/html", "text/plain", etc.
164156
* <p><b>Supported at the type level as well as at the method level!</b>
165-
* When used at the type level, all method-level mappings inherit
166-
* this header restriction (i.e. the type-level restriction
167-
* gets checked before the handler method is even resolved).
157+
* When used at the type level, all method-level mappings inherit this
158+
* header restriction.
168159
* @see org.springframework.http.MediaType
169160
*/
170161
String[] headers() default {};

0 commit comments

Comments
 (0)