Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
d0355935
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d0355935
编写于
5月 23, 2018
作者:
R
Rossen Stoyanchev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update @RequestParam Javadoc and remove Portlet mentions
上级
b472d192
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
25 addition
and
24 deletion
+25
-24
spring-web/src/main/java/org/springframework/web/bind/annotation/RequestHeader.java
...rg/springframework/web/bind/annotation/RequestHeader.java
+2
-2
spring-web/src/main/java/org/springframework/web/bind/annotation/RequestParam.java
...org/springframework/web/bind/annotation/RequestParam.java
+12
-2
spring-web/src/main/java/org/springframework/web/bind/support/DefaultSessionAttributeStore.java
...mework/web/bind/support/DefaultSessionAttributeStore.java
+1
-2
spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java
...rg/springframework/web/context/WebApplicationContext.java
+3
-3
spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java
...framework/web/context/request/FacesRequestAttributes.java
+1
-1
spring-web/src/main/java/org/springframework/web/context/request/RequestAttributes.java
...pringframework/web/context/request/RequestAttributes.java
+3
-3
spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java
...ngframework/web/context/request/RequestContextHolder.java
+1
-1
spring-web/src/main/java/org/springframework/web/context/request/WebRequestInterceptor.java
...gframework/web/context/request/WebRequestInterceptor.java
+1
-9
spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java
...ework/web/context/support/WebApplicationContextUtils.java
+1
-1
未找到文件。
spring-web/src/main/java/org/springframework/web/bind/annotation/RequestHeader.java
浏览文件 @
d0355935
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
8
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 S
ervlet and Portlet environments
.
* <p>Supported for annotated handler methods in S
pring 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>},
...
...
spring-web/src/main/java/org/springframework/web/bind/annotation/RequestParam.java
浏览文件 @
d0355935
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
8
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}
...
...
spring-web/src/main/java/org/springframework/web/bind/support/DefaultSessionAttributeStore.java
浏览文件 @
d0355935
...
...
@@ -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
...
...
spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java
浏览文件 @
d0355935
...
...
@@ -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)
*/
...
...
spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java
浏览文件 @
d0355935
...
...
@@ -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
));
}
...
...
spring-web/src/main/java/org/springframework/web/context/request/RequestAttributes.java
浏览文件 @
d0355935
...
...
@@ -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/Portlet
Session reference for key "session".
* <p>At a minimum: the HttpServletRequest
reference for key "request", and
*
the Http
Session reference for key "session".
* @param key the contextual key
* @return the corresponding object, or {@code null} if none found
*/
...
...
spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java
浏览文件 @
d0355935
...
...
@@ -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."
);
}
}
...
...
spring-web/src/main/java/org/springframework/web/context/request/WebRequestInterceptor.java
浏览文件 @
d0355935
...
...
@@ -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
...
...
spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java
浏览文件 @
d0355935
...
...
@@ -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
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录