Merge branch '2.0.x'
This commit is contained in:
@@ -45,8 +45,8 @@ public class SpockTestRestTemplateExample {
|
||||
ObjectProvider<RestTemplateBuilder> builderProvider,
|
||||
Environment environment) {
|
||||
RestTemplateBuilder builder = builderProvider.getIfAvailable();
|
||||
TestRestTemplate template = builder == null ? new TestRestTemplate()
|
||||
: new TestRestTemplate(builder);
|
||||
TestRestTemplate template = (builder != null ? new TestRestTemplate(builder)
|
||||
: new TestRestTemplate());
|
||||
template.setUriTemplateHandler(new LocalHostUriTemplateHandler(environment));
|
||||
return template;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
// tag::test[]
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(properties = "spring.jmx.enabled=true")
|
||||
@@ -43,7 +44,6 @@ public class SampleJmxTests {
|
||||
@Test
|
||||
public void exampleTest() {
|
||||
// ...
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user