Merge branch '2.0.x'

This commit is contained in:
Phillip Webb
2018-05-03 12:44:58 -07:00
138 changed files with 274 additions and 269 deletions

View File

@@ -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;
}

View File

@@ -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() {
// ...
}
}