DefaultWebClient exposes full URI template as request attribute

Closes gh-30027
This commit is contained in:
Rossen Stoyanchev
2023-12-06 10:16:16 +00:00
committed by rstoyanchev
parent dd23b1d156
commit 2e07f9ab33
6 changed files with 31 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2023 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.
@@ -186,4 +186,12 @@ public class DefaultUriBuilderFactoryTests {
assertThat(uri.toString()).isEqualTo("/foo/bar");
}
@Test // gh-30027
void uriTemplateString() {
String baseUrl = "https://github.com/spring-projects/spring-boot/releases";
String uriTemplate = "/tag/v{version}";
String actual = new DefaultUriBuilderFactory(baseUrl).uriString(uriTemplate).toUriString();
assertThat(actual).isEqualTo(baseUrl + uriTemplate);
}
}