Uses of Class
org.springframework.web.util.UriComponentsBuilder
Packages that use UriComponentsBuilder Package Description org.springframework.web.method.annotation Support classes for annotation-based handler method processing.org.springframework.web.method.support Generic support classes for handler method processing.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotationpackage.org.springframework.web.servlet.support Support classes for Spring's web MVC framework.org.springframework.web.util Miscellaneous web utility classes, such as HTML escaping, Log4j initialization, and cookie handling.Uses of UriComponentsBuilder in org.springframework.web.method.annotation
Methods in org.springframework.web.method.annotation with parameters of type UriComponentsBuilder Modifier and Type Method Description voidRequestParamMethodArgumentResolver. contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String,Object> uriVariables, ConversionService conversionService)Uses of UriComponentsBuilder in org.springframework.web.method.support
Methods in org.springframework.web.method.support with parameters of type UriComponentsBuilder Modifier and Type Method Description voidCompositeUriComponentsContributor. contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String,Object> uriVariables)An overloaded method that uses the ConversionService created at construction.voidCompositeUriComponentsContributor. contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String,Object> uriVariables, ConversionService conversionService)voidUriComponentsContributor. contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String,Object> uriVariables, ConversionService conversionService)Process the given method argument and either update theUriComponentsBuilderor 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
Methods in org.springframework.web.servlet.mvc.method.annotation that return UriComponentsBuilder Modifier and Type Method Description static UriComponentsBuilderMvcUriComponentsBuilder. fromController(Class<?> controllerType)Create aUriComponentsBuilderfrom the mapping of a controller class and current request information including Servlet mapping.static UriComponentsBuilderMvcUriComponentsBuilder. fromController(UriComponentsBuilder builder, Class<?> controllerType)An alternative toMvcUriComponentsBuilder.fromController(Class)that accepts aUriComponentsBuilderrepresenting the base URL.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethod(Class<?> controllerType, Method method, Object... args)Create aUriComponentsBuilderfrom the mapping of a controller method and an array of method argument values.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethod(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method, Object... args)An alternative toMvcUriComponentsBuilder.fromMethod(Class, Method, Object...)that accepts aUriComponentsBuilderrepresenting the base URL.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethodCall(Object info)Create aUriComponentsBuilderby invoking a "mock" controller method.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethodCall(UriComponentsBuilder builder, Object info)An alternative toMvcUriComponentsBuilder.fromMethodCall(Object)that accepts aUriComponentsBuilderrepresenting the base URL.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethodName(Class<?> controllerType, String methodName, Object... args)Create aUriComponentsBuilderfrom the mapping of a controller method and an array of method argument values.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethodName(UriComponentsBuilder builder, Class<?> controllerType, String methodName, Object... args)An alternative toMvcUriComponentsBuilder.fromMethodName(Class, String, Object...)that accepts aUriComponentsBuilderrepresenting the base URL.UriComponentsBuilderMvcUriComponentsBuilder. 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).UriComponentsBuilderMvcUriComponentsBuilder. 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).UriComponentsBuilderMvcUriComponentsBuilder. withMethodCall(Object invocationInfo)An alternative toMvcUriComponentsBuilder.fromMethodCall(Object)for use with an instance of this class created viaMvcUriComponentsBuilder.relativeTo(org.springframework.web.util.UriComponentsBuilder).UriComponentsBuilderMvcUriComponentsBuilder. 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).Methods in org.springframework.web.servlet.mvc.method.annotation with parameters of type UriComponentsBuilder Modifier and Type Method Description voidPathVariableMethodArgumentResolver. contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String,Object> uriVariables, ConversionService conversionService)static UriComponentsBuilderMvcUriComponentsBuilder. fromController(UriComponentsBuilder builder, Class<?> controllerType)An alternative toMvcUriComponentsBuilder.fromController(Class)that accepts aUriComponentsBuilderrepresenting the base URL.static MvcUriComponentsBuilder.MethodArgumentBuilderMvcUriComponentsBuilder. fromMappingName(UriComponentsBuilder builder, String name)An alternative toMvcUriComponentsBuilder.fromMappingName(String)that accepts aUriComponentsBuilderrepresenting the base URL.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethod(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method, Object... args)An alternative toMvcUriComponentsBuilder.fromMethod(Class, Method, Object...)that accepts aUriComponentsBuilderrepresenting the base URL.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethodCall(UriComponentsBuilder builder, Object info)An alternative toMvcUriComponentsBuilder.fromMethodCall(Object)that accepts aUriComponentsBuilderrepresenting the base URL.static UriComponentsBuilderMvcUriComponentsBuilder. fromMethodName(UriComponentsBuilder builder, Class<?> controllerType, String methodName, Object... args)An alternative toMvcUriComponentsBuilder.fromMethodName(Class, String, Object...)that accepts aUriComponentsBuilderrepresenting the base URL.static MvcUriComponentsBuilderMvcUriComponentsBuilder. relativeTo(UriComponentsBuilder baseUrl)Create an instance of this class with a base URL.Constructors in org.springframework.web.servlet.mvc.method.annotation with parameters of type UriComponentsBuilder Constructor Description MethodArgumentBuilder(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method)Create a newMvcUriComponentsBuilder.MethodArgumentBuilderinstance.MvcUriComponentsBuilder(UriComponentsBuilder baseUrl)Default constructor.Uses of UriComponentsBuilder in org.springframework.web.servlet.support
Subclasses of UriComponentsBuilder in org.springframework.web.servlet.support Modifier and Type Class Description classServletUriComponentsBuilderUriComponentsBuilder with additional static factory methods to create links based on the current HttpServletRequest.Uses of UriComponentsBuilder in org.springframework.web.util
Methods in org.springframework.web.util that return UriComponentsBuilder Modifier and Type Method Description UriComponentsBuilderUriComponentsBuilder. cloneBuilder()Clone thisUriComponentsBuilder.UriComponentsBuilderUriComponentsBuilder. encode()Request to have the URI template pre-encoded at build time, and URI variables encoded separately when expanded.UriComponentsBuilderUriComponentsBuilder. encode(Charset charset)A variant ofencode()with a charset other than "UTF-8".UriComponentsBuilderUriComponentsBuilder. fragment(String fragment)static UriComponentsBuilderUriComponentsBuilder. fromHttpRequest(HttpRequest request)Create a newUriComponentsobject from the URI associated with the given HttpRequest while also overlaying with values from the headers "Forwarded" (RFC 7239), or "X-Forwarded-Host", "X-Forwarded-Port", and "X-Forwarded-Proto" if "Forwarded" is not found.static UriComponentsBuilderUriComponentsBuilder. fromHttpUrl(String httpUrl)Create a URI components builder from the given HTTP URL String.static UriComponentsBuilderUriComponentsBuilder. fromOriginHeader(String origin)Create an instance by parsing the "Origin" header of an HTTP request.static UriComponentsBuilderUriComponentsBuilder. fromPath(String path)Create a builder that is initialized with the given path.static UriComponentsBuilderUriComponentsBuilder. fromUri(URI uri)Create a builder that is initialized from the givenURI.static UriComponentsBuilderUriComponentsBuilder. fromUriString(String uri)Create a builder that is initialized with the given URI string.UriComponentsBuilderUriComponentsBuilder. host(String host)protected UriComponentsBuilderDefaultUriTemplateHandler. initUriComponentsBuilder(String uriTemplate)Deprecated.Create aUriComponentsBuilderfrom the URI template string.static UriComponentsBuilderUriComponentsBuilder. newInstance()Create a new, empty builder.UriComponentsBuilderUriComponentsBuilder. path(String path)UriComponentsBuilderUriComponentsBuilder. pathSegment(String... pathSegments)UriComponentsBuilderUriComponentsBuilder. port(int port)UriComponentsBuilderUriComponentsBuilder. port(String port)UriComponentsBuilderUriComponentsBuilder. query(String query)UriComponentsBuilderUriComponentsBuilder. queryParam(String name, Object... values)UriComponentsBuilderUriComponentsBuilder. queryParam(String name, Collection<?> values)UriComponentsBuilderUriComponentsBuilder. queryParams(MultiValueMap<String,String> params)Add multiple query parameters and values.UriComponentsBuilderUriComponentsBuilder. replacePath(String path)UriComponentsBuilderUriComponentsBuilder. replaceQuery(String query)UriComponentsBuilderUriComponentsBuilder. replaceQueryParam(String name, Object... values)UriComponentsBuilderUriComponentsBuilder. replaceQueryParam(String name, Collection<?> values)UriComponentsBuilderUriComponentsBuilder. replaceQueryParams(MultiValueMap<String,String> params)Set the query parameter values after removing all existing ones.UriComponentsBuilderUriComponentsBuilder. scheme(String scheme)UriComponentsBuilderUriComponentsBuilder. schemeSpecificPart(String ssp)Set the URI scheme-specific-part.UriComponentsBuilderUriComponentsBuilder. uri(URI uri)Initialize components of this builder from components of the given URI.UriComponentsBuilderUriComponentsBuilder. uriComponents(UriComponents uriComponents)Set or append individual URI components of this builder from the values of the givenUriComponentsinstance.UriComponentsBuilderUriComponentsBuilder. uriVariables(Map<String,Object> uriVariables)Configure URI variables to be expanded at build time.UriComponentsBuilderUriComponentsBuilder. userInfo(String userInfo)Methods in org.springframework.web.util with parameters of type UriComponentsBuilder Modifier and Type Method Description protected abstract voidUriComponents. copyToUriComponentsBuilder(UriComponentsBuilder builder)Set all components of the given UriComponentsBuilder.protected UriComponentsDefaultUriTemplateHandler. expandAndEncode(UriComponentsBuilder builder, Object[] uriVariables)Deprecated.protected UriComponentsDefaultUriTemplateHandler. expandAndEncode(UriComponentsBuilder builder, Map<String,?> uriVariables)Deprecated.Constructors in org.springframework.web.util with parameters of type UriComponentsBuilder Constructor Description DefaultUriBuilderFactory(UriComponentsBuilder baseUri)Variant ofDefaultUriBuilderFactory(String)with aUriComponentsBuilder.UriComponentsBuilder(UriComponentsBuilder other)Create a deep copy of the given UriComponentsBuilder.