Uses of Class
org.springframework.web.util.UriComponentsBuilder
Package
Description
Support classes for annotation-based handler method processing.
Generic support classes for handler method processing.
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation
package.Support classes for Spring's web MVC framework.
Miscellaneous web utility classes, such as HTML escaping and cookie handling.
-
Uses of UriComponentsBuilder in org.springframework.web.method.annotation
Modifier and TypeMethodDescriptionvoid
RequestParamMethodArgumentResolver.contributeMethodArgument
(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService) -
Uses of UriComponentsBuilder in org.springframework.web.method.support
Modifier and TypeMethodDescriptionvoid
CompositeUriComponentsContributor.contributeMethodArgument
(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables) An overloaded method that uses the ConversionService created at construction.void
CompositeUriComponentsContributor.contributeMethodArgument
(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService) void
UriComponentsContributor.contributeMethodArgument
(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService) Process the given method argument and either update theUriComponentsBuilder
or add to the map with URI variables to use to expand the URI after all arguments are processed. -
Uses of UriComponentsBuilder in org.springframework.web.servlet.mvc.method.annotation
Modifier and TypeMethodDescriptionstatic UriComponentsBuilder
MvcUriComponentsBuilder.fromController
(Class<?> controllerType) Create aUriComponentsBuilder
from the mapping of a controller class and current request information including Servlet mapping.static UriComponentsBuilder
MvcUriComponentsBuilder.fromController
(UriComponentsBuilder builder, Class<?> controllerType) An alternative toMvcUriComponentsBuilder.fromController(Class)
that accepts aUriComponentsBuilder
representing the base URL.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethod
(Class<?> controllerType, Method method, Object... args) Create aUriComponentsBuilder
from the mapping of a controller method and an array of method argument values.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethod
(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method, Object... args) An alternative toMvcUriComponentsBuilder.fromMethod(Class, Method, Object...)
that accepts aUriComponentsBuilder
representing the base URL.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethodCall
(Object info) Create aUriComponentsBuilder
by invoking a "mock" controller method.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethodCall
(UriComponentsBuilder builder, Object info) An alternative toMvcUriComponentsBuilder.fromMethodCall(Object)
that accepts aUriComponentsBuilder
representing the base URL.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethodName
(Class<?> controllerType, String methodName, Object... args) Create aUriComponentsBuilder
from the mapping of a controller method and an array of method argument values.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethodName
(UriComponentsBuilder builder, Class<?> controllerType, String methodName, Object... args) An alternative toMvcUriComponentsBuilder.fromMethodName(Class, String, Object...)
that accepts aUriComponentsBuilder
representing the base URL.MvcUriComponentsBuilder.withController
(Class<?> controllerType) An alternative toMvcUriComponentsBuilder.fromController(Class)
for use with an instance of this class created via a call toMvcUriComponentsBuilder.relativeTo(org.springframework.web.util.UriComponentsBuilder)
.MvcUriComponentsBuilder.withMethod
(Class<?> controllerType, Method method, Object... args) An alternative toMvcUriComponentsBuilder.fromMethod(Class, Method, Object...)
for use with an instance of this class created viaMvcUriComponentsBuilder.relativeTo(org.springframework.web.util.UriComponentsBuilder)
.MvcUriComponentsBuilder.withMethodCall
(Object invocationInfo) An alternative toMvcUriComponentsBuilder.fromMethodCall(Object)
for use with an instance of this class created viaMvcUriComponentsBuilder.relativeTo(org.springframework.web.util.UriComponentsBuilder)
.MvcUriComponentsBuilder.withMethodName
(Class<?> controllerType, String methodName, Object... args) An alternative toMvcUriComponentsBuilder.fromMethodName(Class, String, Object...)
} for use with an instance of this class created viaMvcUriComponentsBuilder.relativeTo(org.springframework.web.util.UriComponentsBuilder)
.Modifier and TypeMethodDescriptionvoid
PathVariableMethodArgumentResolver.contributeMethodArgument
(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService) static UriComponentsBuilder
MvcUriComponentsBuilder.fromController
(UriComponentsBuilder builder, Class<?> controllerType) An alternative toMvcUriComponentsBuilder.fromController(Class)
that accepts aUriComponentsBuilder
representing the base URL.MvcUriComponentsBuilder.fromMappingName
(UriComponentsBuilder builder, String name) An alternative toMvcUriComponentsBuilder.fromMappingName(String)
that accepts aUriComponentsBuilder
representing the base URL.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethod
(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method, Object... args) An alternative toMvcUriComponentsBuilder.fromMethod(Class, Method, Object...)
that accepts aUriComponentsBuilder
representing the base URL.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethodCall
(UriComponentsBuilder builder, Object info) An alternative toMvcUriComponentsBuilder.fromMethodCall(Object)
that accepts aUriComponentsBuilder
representing the base URL.static UriComponentsBuilder
MvcUriComponentsBuilder.fromMethodName
(UriComponentsBuilder builder, Class<?> controllerType, String methodName, Object... args) An alternative toMvcUriComponentsBuilder.fromMethodName(Class, String, Object...)
that accepts aUriComponentsBuilder
representing the base URL.static MvcUriComponentsBuilder
MvcUriComponentsBuilder.relativeTo
(UriComponentsBuilder baseUrl) Create an instance of this class with a base URL.ModifierConstructorDescriptionMethodArgumentBuilder
(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method) Create a newMvcUriComponentsBuilder.MethodArgumentBuilder
instance.protected
Default constructor. -
Uses of UriComponentsBuilder in org.springframework.web.servlet.support
Modifier and TypeClassDescriptionclass
UriComponentsBuilder with additional static factory methods to create links based on the current HttpServletRequest. -
Uses of UriComponentsBuilder in org.springframework.web.util
Modifier and TypeMethodDescriptionstatic UriComponentsBuilder
ForwardedHeaderUtils.adaptFromForwardedHeaders
(URI uri, HttpHeaders headers) UriComponentsBuilder.cloneBuilder()
Clone thisUriComponentsBuilder
.final UriComponentsBuilder
UriComponentsBuilder.encode()
Request to have the URI template pre-encoded at build time, and URI variables encoded separately when expanded.A variant ofencode()
with a charset other than "UTF-8".static UriComponentsBuilder
UriComponentsBuilder.fromHttpRequest
(HttpRequest request) Deprecated, for removal: This API element is subject to removal in a future version.static UriComponentsBuilder
UriComponentsBuilder.fromHttpUrl
(String httpUrl) Deprecated.as of 6.2, in favor offromUriString(String)
; scheduled for removal in 7.0.static UriComponentsBuilder
UriComponentsBuilder.fromOriginHeader
(String origin) Deprecated, for removal: This API element is subject to removal in a future version.in favor offromUriString(String)
; to be removed in 7.0static UriComponentsBuilder
Create a builder that is initialized with the given path.static UriComponentsBuilder
Create a builder that is initialized from the givenURI
.static UriComponentsBuilder
UriComponentsBuilder.fromUriString
(String uri) Variant offromUriString(String, ParserType)
that defaults to theUriComponentsBuilder.ParserType.RFC
parsing.static UriComponentsBuilder
UriComponentsBuilder.fromUriString
(String uri, UriComponentsBuilder.ParserType parserType) Create a builder that is initialized by parsing the given URI string.static UriComponentsBuilder
UriComponentsBuilder.newInstance()
Create a new, empty builder.UriComponentsBuilder.pathSegment
(String... pathSegments) UriComponentsBuilder.port
(int port) UriComponentsBuilder.queryParam
(String name, Object... values) UriComponentsBuilder.queryParam
(String name, Collection<?> values) UriComponentsBuilder.queryParamIfPresent
(String name, Optional<?> value) UriComponentsBuilder.queryParams
(MultiValueMap<String, String> params) Add multiple query parameters and values.UriComponentsBuilder.replacePath
(String path) UriComponentsBuilder.replaceQuery
(String query) UriComponentsBuilder.replaceQueryParam
(String name, Object... values) UriComponentsBuilder.replaceQueryParam
(String name, Collection<?> values) UriComponentsBuilder.replaceQueryParams
(MultiValueMap<String, String> params) Set the query parameter values after removing all existing ones.UriComponentsBuilder.schemeSpecificPart
(String ssp) Set the URI scheme-specific-part.Initialize components of this builder from components of the given URI.UriComponentsBuilder.uriComponents
(UriComponents uriComponents) Set or append individual URI components of this builder from the values of the givenUriComponents
instance.UriComponentsBuilder.uriVariables
(Map<String, Object> uriVariables) Configure URI variables to be expanded at build time.Modifier and TypeMethodDescriptionprotected abstract void
UriComponents.copyToUriComponentsBuilder
(UriComponentsBuilder builder) Set all components of the given UriComponentsBuilder.ModifierConstructorDescriptionVariant ofDefaultUriBuilderFactory(String)
with aUriComponentsBuilder
.protected
Create a deep copy of the given UriComponentsBuilder.
ForwardedHeaderUtils.adaptFromForwardedHeaders(java.net.URI, org.springframework.http.HttpHeaders)
; to be removed in 7.0