You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java
+37-36Lines changed: 37 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2011 the original author or authors.
2
+
* Copyright 2002-2012 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.
@@ -44,24 +44,25 @@
44
44
importorg.springframework.web.util.WebUtils;
45
45
46
46
/**
47
-
* Resolves method arguments annotated with @{@link RequestParam}, arguments of
48
-
* type {@link MultipartFile} in conjunction with Spring's {@link MultipartResolver}
49
-
* abstraction, and arguments of type {@code javax.servlet.http.Part} in conjunction
50
-
* with Servlet 3.0 multipart requests. This resolver can also be created in default
51
-
* resolution mode in which simple types (int, long, etc.) not annotated
52
-
* with @{@link RequestParam} are also treated as request parameters with the
47
+
* Resolves method arguments annotated with @{@link RequestParam}, arguments of
48
+
* type {@link MultipartFile} in conjunction with Spring's {@link MultipartResolver}
49
+
* abstraction, and arguments of type {@code javax.servlet.http.Part} in conjunction
50
+
* with Servlet 3.0 multipart requests. This resolver can also be created in default
51
+
* resolution mode in which simple types (int, long, etc.) not annotated
52
+
* with @{@link RequestParam} are also treated as request parameters with the
53
53
* parameter name derived from the argument name.
54
-
*
55
-
* <p>If the method parameter type is {@link Map}, the request parameter name is used to
56
-
* resolve the request parameter String value. The value is then converted to a {@link Map}
57
-
* via type conversion assuming a suitable {@link Converter} or {@link PropertyEditor} has
58
-
* been registered. If a request parameter name is not specified with a {@link Map} method
59
-
* parameter type, the {@link RequestParamMapMethodArgumentResolver} is used instead
60
-
* providing access to all request parameters in the form of a map.
61
-
*
62
-
* <p>A {@link WebDataBinder} is invoked to apply type conversion to resolved request
54
+
*
55
+
* <p>If the method parameter type is {@link Map}, the name specified in the
56
+
* annotation is used to resolve the request parameter String value. The value is
57
+
* then converted to a {@link Map} via type conversion assuming a suitable
58
+
* {@link Converter} or {@link PropertyEditor} has been registered.
59
+
* Or if a request parameter name is not specified the
60
+
* {@link RequestParamMapMethodArgumentResolver} is used instead to provide
61
+
* access to all request parameters in the form of a map.
62
+
*
63
+
* <p>A {@link WebDataBinder} is invoked to apply type conversion to resolved request
63
64
* header values that don't yet match the method parameter type.
64
-
*
65
+
*
65
66
* @author Arjen Poutsma
66
67
* @author Rossen Stoyanchev
67
68
* @since 3.1
@@ -72,15 +73,15 @@ public class RequestParamMethodArgumentResolver extends AbstractNamedValueMethod
72
73
privatefinalbooleanuseDefaultResolution;
73
74
74
75
/**
75
-
* @param beanFactory a bean factory used for resolving ${...} placeholder
76
-
* and #{...} SpEL expressions in default values, or {@code null} if default
76
+
* @param beanFactory a bean factory used for resolving ${...} placeholder
77
+
* and #{...} SpEL expressions in default values, or {@code null} if default
77
78
* values are not expected to contain expressions
78
-
* @param useDefaultResolution in default resolution mode a method argument
79
-
* that is a simple type, as defined in {@link BeanUtils#isSimpleProperty},
80
-
* is treated as a request parameter even if it itsn't annotated, the
79
+
* @param useDefaultResolution in default resolution mode a method argument
80
+
* that is a simple type, as defined in {@link BeanUtils#isSimpleProperty},
81
+
* is treated as a request parameter even if it itsn't annotated, the
81
82
* request parameter name is derived from the method parameter name.
Copy file name to clipboardExpand all lines: spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolver.java
+33-12Lines changed: 33 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2011 the original author or authors.
2
+
* Copyright 2002-2012 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.
Copy file name to clipboardExpand all lines: spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
0 commit comments