From 9975f0448f31844d3f4316f34b5d483ddb54bded Mon Sep 17 00:00:00 2001 From: Andrii Hrytsiuk Date: Tue, 5 May 2020 21:52:28 +0300 Subject: [PATCH] Align TestRestTemplate Javadoc with documentation --- .../boot/test/web/client/TestRestTemplate.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java index ee877365db77..3a003f85eba0 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java @@ -65,10 +65,14 @@ * {@link #getRestTemplate()}. *

* If you are using the - * {@link org.springframework.boot.test.context.SpringBootTest @SpringBootTest} - * annotation, a {@link TestRestTemplate} is automatically available and can be - * {@code @Autowired} into your test. If you need customizations (for example to adding - * additional message converters) use a {@link RestTemplateBuilder} {@code @Bean}. + * {@link org.springframework.boot.test.context.SpringBootTest @SpringBootTest} annotation + * with + * {@link org.springframework.boot.test.context.SpringBootTest.WebEnvironment#RANDOM_PORT + * WebEnvironment.RANDOM_PORT} or + * {@link org.springframework.boot.test.context.SpringBootTest.WebEnvironment#DEFINED_PORT + * WebEnvironment.DEFINED_PORT}, a {@link TestRestTemplate} is automatically available and + * can be {@code @Autowired} into your test. If you need customizations (for example to + * adding additional message converters) use a {@link RestTemplateBuilder} {@code @Bean}. * * @author Dave Syer * @author Phillip Webb