Browse Source

Polish

pull/47747/head
Stéphane Nicoll 2 months ago
parent
commit
b1d863e968
  1. 2
      documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc

2
documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc

@ -62,7 +62,7 @@ javadoc:org.springframework.boot.resttestclient.TestRestTemplate[] can be instan @@ -62,7 +62,7 @@ javadoc:org.springframework.boot.resttestclient.TestRestTemplate[] can be instan
include-code::MyTests[]
Alternatively, if you use the javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation] annotation with `WebEnvironment.RANDOM_PORT` or `WebEnvironment.DEFINED_PORT`, you can inject a fully configured javadoc:org.springframework.boot.resttestclient.TestRestTemplate[] and start using it.
Alternatively, if you use the javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation] annotation with `WebEnvironment.RANDOM_PORT` or `WebEnvironment.DEFINED_PORT`, you can inject a fully configured javadoc:org.springframework.boot.resttestclient.TestRestTemplate[] by by annotating your test class with javadoc:org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate[format=annotation] and start using it.
If necessary, additional customizations can be applied through the javadoc:org.springframework.boot.web.client.RestTemplateBuilder[] bean.
Any URLs that do not specify a host and port automatically connect to the embedded server, as shown in the following example:

Loading…
Cancel
Save