From 4f28c28287d9715bf1a7a9693a809b099003ae88 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 29 Jan 2018 21:53:22 -0500 Subject: [PATCH] Update Javadoc on uriTemplateHandler property Issue: SPR-16419 --- .../org/springframework/web/client/RestTemplate.java | 10 ++++++++-- .../web/util/DefaultUriTemplateHandler.java | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java index 6c0de42191..ae32dfaefc 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -301,9 +301,15 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat * Configure the {@link UriTemplateHandler} to use to expand URI templates. * By default the {@link DefaultUriBuilderFactory} is used which relies on * Spring's URI template support and exposes several useful properties that - * customize its behavior for encoding and for prepending a common base URL. + * customize its behavior for encoding and for pre-pending a common base URL. * An alternative implementation may be used to plug an external URI * template library. + *

Note: if switching from + * {@link org.springframework.web.util.DefaultUriTemplateHandler + * DefaultUriTemplateHandler} (deprecated in 4.3) to + * {@link DefaultUriBuilderFactory} keep in mind that the + * {@link DefaultUriBuilderFactory} has a different default for the + * {@code parsePath} property (from false to true). * @param handler the URI template handler to use */ public void setUriTemplateHandler(UriTemplateHandler handler) { diff --git a/spring-web/src/main/java/org/springframework/web/util/DefaultUriTemplateHandler.java b/spring-web/src/main/java/org/springframework/web/util/DefaultUriTemplateHandler.java index 9ad9357a30..97e6a1921b 100644 --- a/spring-web/src/main/java/org/springframework/web/util/DefaultUriTemplateHandler.java +++ b/spring-web/src/main/java/org/springframework/web/util/DefaultUriTemplateHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,10 @@ import java.util.Map; * * @author Rossen Stoyanchev * @since 4.2 - * @deprecated as of 5.0 in favor of {@link DefaultUriBuilderFactory} + * @deprecated as of 5.0 in favor of {@link DefaultUriBuilderFactory}. + *

Note: {@link DefaultUriBuilderFactory} has a different + * default for the {@link #setParsePath(boolean) parsePath} property (from + * false to true). */ @Deprecated public class DefaultUriTemplateHandler extends AbstractUriTemplateHandler {