public class ParameterUnpackerFilter
extends org.springframework.web.filter.OncePerRequestFilter
Constructor and Description |
---|
ParameterUnpackerFilter() |
Modifier and Type | Method and Description |
---|---|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain) |
protected Collection<? extends String> |
extractPathKeys(String paramName,
String delimiter) |
void |
setDelimiter(String delimiter) |
void |
setPrefix(String prefix) |
void |
setPutEmptyParamsInPath(boolean putEmptyParamsInPath)
Flag to say that empty parameter value signal their name should be used
as a path parameter.
|
protected Map<String,String[]> |
unpack(String paramName,
String delimiter) |
doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
public void setPutEmptyParamsInPath(boolean putEmptyParamsInPath)
/context/path?unpack_foo
goes to
context/path/foo
.putEmptyParamsInPath
- the flag value to set (defaults to false)public void setDelimiter(String delimiter)
delimiter
- the delimiter used to separate parameter names from
valuespublic void setPrefix(String prefix)
prefix
- the prefix for parameter names that need to be unpackedprotected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException
doFilterInternal
in class org.springframework.web.filter.OncePerRequestFilter
javax.servlet.ServletException
IOException
protected Collection<? extends String> extractPathKeys(String paramName, String delimiter)
Copyright © 2015. All rights reserved.