From f11c030b7185b60dba0b116b0e0859600b6700ad Mon Sep 17 00:00:00 2001 From: Andrii Hrytsiuk Date: Tue, 5 May 2020 21:52:28 +0300 Subject: [PATCH 1/2] Align TestRestTemplate Javadoc with documentation See gh-21318 --- .../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 ee877365db7..3a003f85eba 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 @@ import org.springframework.web.util.UriTemplateHandler; * {@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 From 60ff8bafb52ca2788eff9956d34c64a9005bc5f5 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 8 May 2020 14:49:13 +0200 Subject: [PATCH 2/2] Polish "Align TestRestTemplate Javadoc with documentation" See gh-21318 --- .../boot/test/web/client/TestRestTemplate.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 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 3a003f85eba..435e22a46a9 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -66,13 +66,9 @@ import org.springframework.web.util.UriTemplateHandler; *

* If you are using the * {@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}. + * with an embedded server, 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