Commit ac1f2a58 authored by Andy Wilkinson's avatar Andy Wilkinson

Polish

parent c0574c84
......@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.security.reactive;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
......
......@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.security.servlet;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
......
......@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.security.servlet;
import org.springframework.boot.actuate.health.HealthEndpoint;
......@@ -32,7 +33,6 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
* configuration.
*
* @author Madhura Bhave
* @since 2.0.1
*/
@Configuration
class ManagementWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
......
......@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.security.reactive;
import java.net.URI;
......
......@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.security.servlet;
import java.io.IOException;
......
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
......@@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
/**
......@@ -34,7 +34,7 @@ import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
* @author Stephane Nicoll
*/
@Order(0)
class SpringBootRepositoryRestConfigurer extends RepositoryRestConfigurerAdapter {
class SpringBootRepositoryRestConfigurer implements RepositoryRestConfigurer {
@Autowired(required = false)
private Jackson2ObjectMapperBuilder objectMapperBuilder;
......
......@@ -143,12 +143,10 @@ public class ArtemisAutoConfigurationTests {
this.contextRunner.withUserConfiguration(EmptyConfiguration.class)
.withPropertyValues("spring.artemis.mode:native",
"spring.artemis.host:192.168.1.144", "spring.artemis.port:9876")
.run((context) -> {
assertNettyConnectionFactory(
getActiveMQConnectionFactory(
context.getBean(ConnectionFactory.class)),
"192.168.1.144", 9876);
});
.run((context) -> assertNettyConnectionFactory(
getActiveMQConnectionFactory(
context.getBean(ConnectionFactory.class)),
"192.168.1.144", 9876));
}
@Test
......
......@@ -106,10 +106,9 @@ public class HibernatePropertiesTests {
@Test
public void useNewIdGeneratorMappingsDefault() {
this.contextRunner.run(assertHibernateProperties((hibernateProperties) -> {
assertThat(hibernateProperties).containsEntry(
AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "true");
}));
this.contextRunner.run(assertHibernateProperties(
(hibernateProperties) -> assertThat(hibernateProperties).containsEntry(
AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "true")));
}
@Test
......@@ -117,10 +116,11 @@ public class HibernatePropertiesTests {
this.contextRunner
.withPropertyValues(
"spring.jpa.hibernate.use-new-id-generator-mappings:false")
.run(assertHibernateProperties((hibernateProperties) -> {
assertThat(hibernateProperties).containsEntry(
AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "false");
}));
.run(assertHibernateProperties(
(hibernateProperties) -> assertThat(hibernateProperties)
.containsEntry(
AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS,
"false")));
}
@Test
......
......@@ -190,9 +190,8 @@ public class WebMvcAutoConfigurationTests {
@Test
public void resourceHandlerMappingDisabled() {
this.contextRunner.withPropertyValues("spring.resources.add-mappings:false")
.run((context) -> {
assertThat(context.getBean("resourceHandlerMapping")).isEqualTo(null);
});
.run((context) -> assertThat(context.getBean("resourceHandlerMapping"))
.isEqualTo(null));
}
@Test
......
......@@ -93,9 +93,7 @@ public class WebServiceTemplateAutoConfigurationTests {
@Test
public void builderShouldBeFreshForEachUse() {
this.contextRunner.withUserConfiguration(DirtyWebServiceTemplateConfig.class)
.run((context) -> {
assertThat(context).hasNotFailed();
});
.run((context) -> assertThat(context).hasNotFailed());
}
private ContextConsumer<AssertableApplicationContext> assertWebServiceTemplateBuilder(
......
......@@ -16,6 +16,8 @@
package org.springframework.boot.docs.web.client;
import java.time.Duration;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -56,7 +58,8 @@ public class SampleWebClientTests {
@Bean
public RestTemplateBuilder restTemplateBuilder() {
return new RestTemplateBuilder().setConnectTimeout(1000).setReadTimeout(1000);
return new RestTemplateBuilder().setConnectTimeout(Duration.ofSeconds(1))
.setReadTimeout(Duration.ofSeconds(1));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment