接口 FlashMapManager
public interface FlashMapManager
A strategy interface for retrieving and saving FlashMap instances. SeeFlashMap
for a general overview of flash attributes.- 从以下版本开始:
- 3.1
- 作者:
- Rossen Stoyanchev
- 另请参阅:
FlashMap
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 FlashMap
retrieveAndUpdate(HttpServletRequest request, HttpServletResponse response)
Find a FlashMap saved by a previous request that matches to the current request, remove it from underlying storage, and also remove other expired FlashMap instances.void
saveOutputFlashMap(FlashMap flashMap, HttpServletRequest request, HttpServletResponse response)
Save the given FlashMap, in some underlying storage and set the start of its expiration period.
方法详细资料
retrieveAndUpdate
FlashMap retrieveAndUpdate(HttpServletRequest request, HttpServletResponse response)
Find a FlashMap saved by a previous request that matches to the current request, remove it from underlying storage, and also remove other expired FlashMap instances.This method is invoked in the beginning of every request in contrast to
saveOutputFlashMap(org.springframework.web.servlet.FlashMap, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
, which is invoked only when there are flash attributes to be saved - i.e. before a redirect.- 参数:
request
- the current requestresponse
- the current response- 返回:
- a FlashMap matching the current request or
null
saveOutputFlashMap
void saveOutputFlashMap(FlashMap flashMap, HttpServletRequest request, HttpServletResponse response)
Save the given FlashMap, in some underlying storage and set the start of its expiration period.NOTE: Invoke this method prior to a redirect in order to allow saving the FlashMap in the HTTP session or in a response cookie before the response is committed.
- 参数:
flashMap
- the FlashMap to saverequest
- the current requestresponse
- the current response