Add RestTemplateBuilder support

Add a RestTemplateBuilder that allows RestTemplates to be easily created
and configured.

See gh-5507
This commit is contained in:
Phillip Webb
2016-05-31 09:28:14 -07:00
parent e664d585d9
commit b641e63466
10 changed files with 1210 additions and 33 deletions

View File

@@ -47,7 +47,7 @@ public class LocalHostUriTemplateHandlerTests {
environment.setProperty("local.server.port", "1234");
LocalHostUriTemplateHandler handler = new LocalHostUriTemplateHandler(
environment);
assertThat(handler.getBaseUrl()).isEqualTo("http://localhost:1234");
assertThat(handler.getRootUri()).isEqualTo("http://localhost:1234");
}
@Test
@@ -55,7 +55,7 @@ public class LocalHostUriTemplateHandlerTests {
MockEnvironment environment = new MockEnvironment();
LocalHostUriTemplateHandler handler = new LocalHostUriTemplateHandler(
environment);
assertThat(handler.getBaseUrl()).isEqualTo("http://localhost:8080");
assertThat(handler.getRootUri()).isEqualTo("http://localhost:8080");
}
}