Update @RequestParam Javadoc and remove Portlet mentions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.core.annotation.AliasFor;
|
||||
/**
|
||||
* Annotation which indicates that a method parameter should be bound to a web request header.
|
||||
*
|
||||
* <p>Supported for annotated handler methods in Servlet and Portlet environments.
|
||||
* <p>Supported for annotated handler methods in Spring MVC and Spring WebFlux.
|
||||
*
|
||||
* <p>If the method parameter is {@link java.util.Map Map<String, String>},
|
||||
* {@link org.springframework.util.MultiValueMap MultiValueMap<String, String>},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,17 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* Annotation which indicates that a method parameter should be bound to a web
|
||||
* request parameter.
|
||||
*
|
||||
* <p>Supported for annotated handler methods in Servlet and Portlet environments.
|
||||
* <p>Supported for annotated handler methods in Spring MVC and Spring WebFlux
|
||||
* as follows:
|
||||
* <ul>
|
||||
* <li>In Spring MVC, "request parameters" map to query parameters, form data,
|
||||
* and parts in multipart requests. This is because the Servlet API combines
|
||||
* query parameters and form data into a single map called "parameters", and
|
||||
* that includes automatic parsing of the request body.
|
||||
* <li>In Spring WebFlux, "request parameters" map to query parameters only.
|
||||
* To work with all 3, query, form data, and multipart data, you can use data
|
||||
* binding to a command object annotated with {@link ModelAttribute}.
|
||||
* </ul>
|
||||
*
|
||||
* <p>If the method parameter type is {@link Map} and a request parameter name
|
||||
* is specified, then the request parameter value is converted to a {@link Map}
|
||||
|
||||
@@ -22,8 +22,7 @@ import org.springframework.web.context.request.WebRequest;
|
||||
|
||||
/**
|
||||
* Default implementation of the {@link SessionAttributeStore} interface,
|
||||
* storing the attributes in the WebRequest session (i.e. HttpSession
|
||||
* or PortletSession).
|
||||
* storing the attributes in the WebRequest session (i.e. HttpSession).
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5
|
||||
|
||||
@@ -79,8 +79,8 @@ public interface WebApplicationContext extends ApplicationContext {
|
||||
String SERVLET_CONTEXT_BEAN_NAME = "servletContext";
|
||||
|
||||
/**
|
||||
* Name of the ServletContext/PortletContext init-params environment bean in the factory.
|
||||
* <p>Note: Possibly merged with ServletConfig/PortletConfig parameters.
|
||||
* Name of the ServletContext init-params environment bean in the factory.
|
||||
* <p>Note: Possibly merged with ServletConfig parameters.
|
||||
* ServletConfig parameters override ServletContext parameters of the same name.
|
||||
* @see javax.servlet.ServletContext#getInitParameterNames()
|
||||
* @see javax.servlet.ServletContext#getInitParameter(String)
|
||||
@@ -90,7 +90,7 @@ public interface WebApplicationContext extends ApplicationContext {
|
||||
String CONTEXT_PARAMETERS_BEAN_NAME = "contextParameters";
|
||||
|
||||
/**
|
||||
* Name of the ServletContext/PortletContext attributes environment bean in the factory.
|
||||
* Name of the ServletContext attributes environment bean in the factory.
|
||||
* @see javax.servlet.ServletContext#getAttributeNames()
|
||||
* @see javax.servlet.ServletContext#getAttribute(String)
|
||||
*/
|
||||
|
||||
@@ -191,7 +191,7 @@ public class FacesRequestAttributes implements RequestAttributes {
|
||||
public String getSessionId() {
|
||||
Object session = getExternalContext().getSession(true);
|
||||
try {
|
||||
// Both HttpSession and PortletSession have a getId() method.
|
||||
// HttpSession has a getId() method.
|
||||
Method getIdMethod = session.getClass().getMethod("getId");
|
||||
return String.valueOf(ReflectionUtils.invokeMethod(getIdMethod, session));
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface RequestAttributes {
|
||||
/**
|
||||
* Constant that indicates session scope.
|
||||
* <p>This preferably refers to a locally isolated session, if such
|
||||
* a distinction is available (for example, in a Portlet environment).
|
||||
* a distinction is available.
|
||||
* Else, it simply refers to the common session.
|
||||
*/
|
||||
int SCOPE_SESSION = 1;
|
||||
@@ -120,8 +120,8 @@ public interface RequestAttributes {
|
||||
|
||||
/**
|
||||
* Resolve the contextual reference for the given key, if any.
|
||||
* <p>At a minimum: the HttpServletRequest/PortletRequest reference for key
|
||||
* "request", and the HttpSession/PortletSession reference for key "session".
|
||||
* <p>At a minimum: the HttpServletRequest reference for key "request", and
|
||||
* the HttpSession reference for key "session".
|
||||
* @param key the contextual key
|
||||
* @return the corresponding object, or {@code null} if none found
|
||||
*/
|
||||
|
||||
@@ -132,7 +132,7 @@ public abstract class RequestContextHolder {
|
||||
"Are you referring to request attributes outside of an actual web request, " +
|
||||
"or processing a request outside of the originally receiving thread? " +
|
||||
"If you are actually operating within a web request and still receive this message, " +
|
||||
"your code is probably running outside of DispatcherServlet/DispatcherPortlet: " +
|
||||
"your code is probably running outside of DispatcherServlet: " +
|
||||
"In this case, use RequestContextListener or RequestContextFilter to expose the current request.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,7 @@ import org.springframework.ui.ModelMap;
|
||||
|
||||
/**
|
||||
* Interface for general web request interception. Allows for being applied
|
||||
* to Servlet request as well as Portlet request environments, by building
|
||||
* on the {@link WebRequest} abstraction.
|
||||
* to Servlet request by building on the {@link WebRequest} abstraction.
|
||||
*
|
||||
* <p>This interface assumes MVC-style request processing: A handler gets executed,
|
||||
* exposes a set of model objects, then a view gets rendered based on that model.
|
||||
@@ -40,13 +39,6 @@ import org.springframework.ui.ModelMap;
|
||||
* <p>This interface is deliberately minimalistic to keep the dependencies of
|
||||
* generic request interceptors as minimal as feasible.
|
||||
*
|
||||
* <p><b>NOTE:</b> While this interceptor is applied to the entire request processing
|
||||
* in a Servlet environment, it is by default only applied to the <i>render</i> phase
|
||||
* in a Portlet environment, preparing and rendering a Portlet view. To apply
|
||||
* WebRequestInterceptors to the <i>action</i> phase as well, set the HandlerMapping's
|
||||
* "applyWebRequestInterceptorsToRenderPhaseOnly" flag to "false". Alternatively,
|
||||
* consider using the Portlet-specific HandlerInterceptor mechanism for such needs.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
* @see ServletWebRequest
|
||||
|
||||
@@ -215,7 +215,7 @@ public abstract class WebApplicationContextUtils {
|
||||
* with the given BeanFactory, as used by the WebApplicationContext.
|
||||
* @param bf the BeanFactory to configure
|
||||
* @param servletContext the ServletContext that we're running within
|
||||
* @param servletConfig the ServletConfig of the containing Portlet
|
||||
* @param servletConfig the ServletConfig
|
||||
*/
|
||||
public static void registerEnvironmentBeans(ConfigurableListableBeanFactory bf,
|
||||
@Nullable ServletContext servletContext, @Nullable ServletConfig servletConfig) {
|
||||
|
||||
Reference in New Issue
Block a user