类 DefaultUriTemplateHandler
- java.lang.Object
- org.springframework.web.util.AbstractUriTemplateHandler
- org.springframework.web.util.DefaultUriTemplateHandler
- 所有已实现的接口:
UriTemplateHandler
@Deprecated public class DefaultUriTemplateHandler extends AbstractUriTemplateHandler
已过时。as of 5.0 in favor ofDefaultUriBuilderFactory.Note:
DefaultUriBuilderFactoryhas a different default for theparsePathproperty (from false to true).Default implementation ofUriTemplateHandlerbased on the use ofUriComponentsBuilderfor expanding and encoding variables.There are also several properties to customize how URI template handling is performed, including a
baseUrlto be used as a prefix for all URI templates and a couple of encoding related options —parsePathandstrictEncodingrespectively.- 从以下版本开始:
- 4.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 DefaultUriTemplateHandler()已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected UriComponentsexpandAndEncode(UriComponentsBuilder builder, Object[] uriVariables)已过时。protected UriComponentsexpandAndEncode(UriComponentsBuilder builder, Map<String,?> uriVariables)已过时。protected URIexpandInternal(String uriTemplate, Object... uriVariables)已过时。Actually expand and encode the URI template.protected URIexpandInternal(String uriTemplate, Map<String,?> uriVariables)已过时。Actually expand and encode the URI template.protected UriComponentsBuilderinitUriComponentsBuilder(String uriTemplate)已过时。Create aUriComponentsBuilderfrom the URI template string.booleanisStrictEncoding()已过时。Whether to strictly encode any character outside the unreserved set.voidsetParsePath(boolean parsePath)已过时。Whether to parse the path of a URI template string into path segments.voidsetStrictEncoding(boolean strictEncoding)已过时。Whether to encode characters outside the unreserved set as defined in RFC 3986 Section 2.booleanshouldParsePath()已过时。Whether the handler is configured to parse the path into path segments.从类继承的方法 org.springframework.web.util.AbstractUriTemplateHandler
expand, expand, getBaseUrl, getDefaultUriVariables, setBaseUrl, setDefaultUriVariables
构造器详细资料
DefaultUriTemplateHandler
public DefaultUriTemplateHandler()
已过时。
方法详细资料
setParsePath
public void setParsePath(boolean parsePath)
已过时。Whether to parse the path of a URI template string into path segments.If set to
truethe URI template path is immediately decomposed into path segments any URI variables expanded into it are then subject to path segment encoding rules. In effect URI variables in the path have any "/" characters percent encoded.By default this is set to
falsein which case the path is kept as a full path and expanded URI variables will preserve "/" characters.- 参数:
parsePath- whether to parse the path into path segments
shouldParsePath
public boolean shouldParsePath()
已过时。Whether the handler is configured to parse the path into path segments.
setStrictEncoding
public void setStrictEncoding(boolean strictEncoding)
已过时。Whether to encode characters outside the unreserved set as defined in RFC 3986 Section 2. This ensures a URI variable value will not contain any characters with a reserved purpose.By default this is set to
falsein which case only characters illegal for the given URI component are encoded. For example when expanding a URI variable into a path segment the "/" character is illegal and encoded. The ";" character however is legal and not encoded even though it has a reserved purpose.Note: this property supersedes the need to also set the
parsePathproperty.- 参数:
strictEncoding- whether to perform strict encoding- 从以下版本开始:
- 4.3
isStrictEncoding
public boolean isStrictEncoding()
已过时。Whether to strictly encode any character outside the unreserved set.
expandInternal
protected URI expandInternal(String uriTemplate, Map<String,?> uriVariables)
已过时。从类复制的说明:AbstractUriTemplateHandlerActually expand and encode the URI template.
expandInternal
protected URI expandInternal(String uriTemplate, Object... uriVariables)
已过时。从类复制的说明:AbstractUriTemplateHandlerActually expand and encode the URI template.
initUriComponentsBuilder
protected UriComponentsBuilder initUriComponentsBuilder(String uriTemplate)
已过时。Create aUriComponentsBuilderfrom the URI template string. This implementation also breaks up the path into path segments depending on whetherparsePathis enabled.
expandAndEncode
protected UriComponents expandAndEncode(UriComponentsBuilder builder, Map<String,?> uriVariables)
已过时。
expandAndEncode
protected UriComponents expandAndEncode(UriComponentsBuilder builder, Object[] uriVariables)
已过时。