Skip to content

Commit ec5d6bc

Browse files
committed
@AutoConfigureTestRestTemplate
1 parent ecdc6c4 commit ec5d6bc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

servlet/spring-boot/java/authentication/username-password/user-details-service/custom-user/src/integTest/java/example/HelloSecurityExplicitITests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.springframework.beans.factory.annotation.Autowired;
2222
import org.springframework.boot.resttestclient.TestRestTemplate;
23+
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
2324
import org.springframework.boot.test.context.SpringBootTest;
2425

2526
import static org.assertj.core.api.Assertions.assertThat;
@@ -30,6 +31,7 @@
3031
* @author Michael Simons
3132
*/
3233
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
34+
@AutoConfigureTestRestTemplate
3335
public class HelloSecurityExplicitITests {
3436

3537
@Autowired

servlet/spring-boot/java/observability/src/integTest/java/example/HelloObservabilityApplicationITests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import org.springframework.beans.factory.annotation.Autowired;
2525
import org.springframework.boot.resttestclient.TestRestTemplate;
26+
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
2627
import org.springframework.boot.test.context.SpringBootTest;
2728
import org.springframework.http.HttpEntity;
2829
import org.springframework.http.HttpHeaders;
@@ -42,6 +43,7 @@
4243
* @since 5.0
4344
*/
4445
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
46+
@AutoConfigureTestRestTemplate
4547
public class HelloObservabilityApplicationITests {
4648

4749
@Autowired

0 commit comments

Comments
 (0)