diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/AbstractMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/AbstractMvcEndpoint.java index 55b73530a55..c01dd43e79d 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/AbstractMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/AbstractMvcEndpoint.java @@ -21,7 +21,7 @@ import org.springframework.boot.actuate.endpoint.EndpointProperties; import org.springframework.context.EnvironmentAware; import org.springframework.core.env.Environment; import org.springframework.util.Assert; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Abstract base class for {@link MvcEndpoint} implementations without a backing @@ -31,8 +31,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter * @author Lari Hotari * @since 1.4.0 */ -public abstract class AbstractMvcEndpoint extends WebMvcConfigurerAdapter - implements MvcEndpoint, EnvironmentAware { +public abstract class AbstractMvcEndpoint + implements MvcEndpoint, WebMvcConfigurer, EnvironmentAware { private Environment environment; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java index 71089ef66d6..ae813b62460 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java @@ -39,7 +39,7 @@ import org.springframework.data.neo4j.transaction.Neo4jTransactionManager; import org.springframework.data.neo4j.web.support.OpenSessionInViewInterceptor; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Data Neo4j. @@ -108,14 +108,14 @@ public class Neo4jDataAutoConfiguration { @Configuration @ConditionalOnWebApplication(type = Type.SERVLET) - @ConditionalOnClass({ WebMvcConfigurerAdapter.class, + @ConditionalOnClass({ WebMvcConfigurer.class, OpenSessionInViewInterceptor.class }) @ConditionalOnMissingBean(OpenSessionInViewInterceptor.class) @ConditionalOnProperty(prefix = "spring.data.neo4j", name = "open-in-view", havingValue = "true", matchIfMissing = true) protected static class Neo4jWebConfiguration { @Configuration - protected static class Neo4jWebMvcConfiguration extends WebMvcConfigurerAdapter { + protected static class Neo4jWebMvcConfiguration implements WebMvcConfigurer { @Bean public OpenSessionInViewInterceptor neo4jOpenSessionInViewInterceptor() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java index a137918be69..13d85d7feb1 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoCon import org.springframework.context.annotation.Configuration; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.data.web.config.EnableSpringDataWebSupport; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Data's web support. @@ -41,7 +41,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter @EnableSpringDataWebSupport @ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnClass({ PageableHandlerMethodArgumentResolver.class, - WebMvcConfigurerAdapter.class }) + WebMvcConfigurer.class }) @ConditionalOnMissingBean(PageableHandlerMethodArgumentResolver.class) @AutoConfigureAfter(RepositoryRestMvcAutoConfiguration.class) public class SpringDataWebAutoConfiguration { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceResolverAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceResolverAutoConfiguration.java index 549c15fb025..a7202b485bd 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceResolverAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceResolverAutoConfiguration.java @@ -33,7 +33,7 @@ import org.springframework.mobile.device.DeviceResolver; import org.springframework.mobile.device.DeviceResolverHandlerInterceptor; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Mobile's @@ -62,7 +62,7 @@ public class DeviceResolverAutoConfiguration { @Configuration @Order(0) protected static class DeviceResolverMvcConfiguration - extends WebMvcConfigurerAdapter { + implements WebMvcConfigurer { private DeviceResolverHandlerInterceptor deviceResolverHandlerInterceptor; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/SitePreferenceAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/SitePreferenceAutoConfiguration.java index f77b6fb7b03..6744b4406a5 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/SitePreferenceAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/SitePreferenceAutoConfiguration.java @@ -33,7 +33,7 @@ import org.springframework.mobile.device.site.SitePreferenceHandlerInterceptor; import org.springframework.mobile.device.site.SitePreferenceHandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Mobile's @@ -64,7 +64,7 @@ public class SitePreferenceAutoConfiguration { @Configuration protected static class SitePreferenceMvcConfiguration - extends WebMvcConfigurerAdapter { + implements WebMvcConfigurer { private final SitePreferenceHandlerInterceptor sitePreferenceHandlerInterceptor; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java index 8a456bdff8b..04ca4e3440c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java @@ -52,7 +52,7 @@ import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.jta.JtaTransactionManager; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Base {@link EnableAutoConfiguration Auto-configuration} for JPA. @@ -197,7 +197,7 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware { @Configuration @ConditionalOnWebApplication(type = Type.SERVLET) - @ConditionalOnClass(WebMvcConfigurerAdapter.class) + @ConditionalOnClass(WebMvcConfigurer.class) @ConditionalOnMissingBean({ OpenEntityManagerInViewInterceptor.class, OpenEntityManagerInViewFilter.class }) @ConditionalOnProperty(prefix = "spring.jpa", name = "open-in-view", havingValue = "true", matchIfMissing = true) @@ -206,7 +206,7 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware { // Defined as a nested config to ensure WebMvcConfigurerAdapter is not read when // not on the classpath @Configuration - protected static class JpaWebMvcConfiguration extends WebMvcConfigurerAdapter { + protected static class JpaWebMvcConfiguration implements WebMvcConfigurer { @Bean public OpenEntityManagerInViewInterceptor openEntityManagerInViewInterceptor() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfiguration.java index c1d846c1fbf..aee53ce9f06 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfiguration.java @@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Security OAuth2. @@ -40,7 +40,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter * @since 1.3.0 */ @Configuration -@ConditionalOnClass({ OAuth2AccessToken.class, WebMvcConfigurerAdapter.class }) +@ConditionalOnClass({ OAuth2AccessToken.class, WebMvcConfigurer.class }) @Import({ OAuth2AuthorizationServerConfiguration.class, OAuth2MethodSecurityConfiguration.class, OAuth2ResourceServerConfiguration.class, OAuth2RestOperationsConfiguration.class }) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java index 83232c24ddb..8cd6b1698a8 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java @@ -114,7 +114,7 @@ import org.springframework.web.servlet.config.annotation.ResourceChainRegistrati import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver; import org.springframework.web.servlet.handler.AbstractUrlHandlerMapping; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; @@ -146,7 +146,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver; @Configuration @ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnClass({ Servlet.class, DispatcherServlet.class, - WebMvcConfigurerAdapter.class }) + WebMvcConfigurer.class }) @ConditionalOnMissingBean(WebMvcConfigurationSupport.class) @AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE + 10) @AutoConfigureAfter({ DispatcherServletAutoConfiguration.class, @@ -170,15 +170,15 @@ public class WebMvcAutoConfiguration { return new OrderedHttpPutFormContentFilter(); } - // Defined as a nested config to ensure WebMvcConfigurerAdapter is not read when not + // Defined as a nested config to ensure WebMvcConfigurer is not read when not // on the classpath @Configuration @Import({ EnableWebMvcConfiguration.class, MvcValidatorRegistrar.class }) @EnableConfigurationProperties({ WebMvcProperties.class, ResourceProperties.class }) - public static class WebMvcAutoConfigurationAdapter extends WebMvcConfigurerAdapter { + public static class WebMvcAutoConfigurationAdapter implements WebMvcConfigurer { private static final Log logger = LogFactory - .getLog(WebMvcConfigurerAdapter.class); + .getLog(WebMvcConfigurer.class); private final ResourceProperties resourceProperties; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java index f1d39693974..a71d48eb3a5 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java @@ -78,7 +78,7 @@ import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.View; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.handler.HandlerExceptionResolverComposite; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver; @@ -834,7 +834,7 @@ public class WebMvcAutoConfigurationTests { } @Configuration - protected static class WebJars extends WebMvcConfigurerAdapter { + protected static class WebJars implements WebMvcConfigurer { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { @@ -845,7 +845,7 @@ public class WebMvcAutoConfigurationTests { } @Configuration - protected static class AllResources extends WebMvcConfigurerAdapter { + protected static class AllResources implements WebMvcConfigurer { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { @@ -976,7 +976,7 @@ public class WebMvcAutoConfigurationTests { } @Configuration - protected static class ValidatorWebMvcConfigurer extends WebMvcConfigurerAdapter { + protected static class ValidatorWebMvcConfigurer implements WebMvcConfigurer { @Override public Validator getValidator() { diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java index 24844bf9d3f..7f4aac1c4ce 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java @@ -33,7 +33,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootConfiguration @EnableAutoConfiguration @@ -60,7 +60,7 @@ public class SampleAtmosphereApplication { } @Configuration - static class MvcConfiguration extends WebMvcConfigurerAdapter { + static class MvcConfiguration implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { diff --git a/spring-boot-samples/spring-boot-sample-traditional/src/main/java/sample/traditional/config/WebConfig.java b/spring-boot-samples/spring-boot-sample-traditional/src/main/java/sample/traditional/config/WebConfig.java index 5f605eb76c7..97cec12be6f 100644 --- a/spring-boot-samples/spring-boot-sample-traditional/src/main/java/sample/traditional/config/WebConfig.java +++ b/spring-boot-samples/spring-boot-sample-traditional/src/main/java/sample/traditional/config/WebConfig.java @@ -23,13 +23,13 @@ import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.InternalResourceViewResolver; @EnableWebMvc @ComponentScan @Configuration -public class WebConfig extends WebMvcConfigurerAdapter { +public class WebConfig implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { diff --git a/spring-boot-samples/spring-boot-sample-web-method-security/src/main/java/sample/security/method/SampleMethodSecurityApplication.java b/spring-boot-samples/spring-boot-sample-web-method-security/src/main/java/sample/security/method/SampleMethodSecurityApplication.java index 6f38b7f82c1..38c66b9faef 100644 --- a/spring-boot-samples/spring-boot-sample-web-method-security/src/main/java/sample/security/method/SampleMethodSecurityApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-method-security/src/main/java/sample/security/method/SampleMethodSecurityApplication.java @@ -35,11 +35,11 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootApplication @EnableGlobalMethodSecurity(securedEnabled = true) -public class SampleMethodSecurityApplication extends WebMvcConfigurerAdapter { +public class SampleMethodSecurityApplication implements WebMvcConfigurer { @Controller protected static class HomeController { diff --git a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java index ff2227ab375..f882026b328 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java @@ -31,11 +31,11 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootApplication @Controller -public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter { +public class SampleWebSecureCustomApplication implements WebMvcConfigurer { @GetMapping("/") public String home(Map model) { diff --git a/spring-boot-samples/spring-boot-sample-web-secure-github/src/main/java/sample/web/secure/github/SampleGithubSecureApplication.java b/spring-boot-samples/spring-boot-sample-web-secure-github/src/main/java/sample/web/secure/github/SampleGithubSecureApplication.java index d67cea87b12..8809de92a14 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-github/src/main/java/sample/web/secure/github/SampleGithubSecureApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-github/src/main/java/sample/web/secure/github/SampleGithubSecureApplication.java @@ -19,11 +19,11 @@ package sample.web.secure.github; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootApplication @EnableOAuth2Sso -public class SampleGithubSecureApplication extends WebMvcConfigurerAdapter { +public class SampleGithubSecureApplication implements WebMvcConfigurer { public static void main(String[] args) throws Exception { SpringApplication.run(SampleGithubSecureApplication.class, args); diff --git a/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/java/sample/web/secure/jdbc/SampleWebSecureJdbcApplication.java b/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/java/sample/web/secure/jdbc/SampleWebSecureJdbcApplication.java index e798f591e2e..5947ad1f5b7 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/java/sample/web/secure/jdbc/SampleWebSecureJdbcApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/java/sample/web/secure/jdbc/SampleWebSecureJdbcApplication.java @@ -34,11 +34,11 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootApplication @Controller -public class SampleWebSecureJdbcApplication extends WebMvcConfigurerAdapter { +public class SampleWebSecureJdbcApplication implements WebMvcConfigurer { @GetMapping("/") public String home(Map model) { diff --git a/spring-boot-samples/spring-boot-sample-web-secure/src/main/java/sample/web/secure/SampleWebSecureApplication.java b/spring-boot-samples/spring-boot-sample-web-secure/src/main/java/sample/web/secure/SampleWebSecureApplication.java index 09c3dbc74c5..5d98af65947 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure/src/main/java/sample/web/secure/SampleWebSecureApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-secure/src/main/java/sample/web/secure/SampleWebSecureApplication.java @@ -31,11 +31,11 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootApplication @Controller -public class SampleWebSecureApplication extends WebMvcConfigurerAdapter { +public class SampleWebSecureApplication implements WebMvcConfigurer { @GetMapping("/") public String home(Map model) { diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java index 2fbde812557..b11acf59b85 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java @@ -30,7 +30,7 @@ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import static org.assertj.core.api.Assertions.assertThat; @@ -155,7 +155,7 @@ public class WebMvcTypeExcludeFilterTests { } - static class ExampleWeb extends WebMvcConfigurerAdapter { + static class ExampleWeb implements WebMvcConfigurer { } diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcConfigurer.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcConfigurer.java index 1e323ee97ba..b3d5a6f07fe 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcConfigurer.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcConfigurer.java @@ -26,7 +26,6 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * Example {@link WebMvcConfigurer} used in {@link WebMvcTest} tests. @@ -34,7 +33,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter * @author Phillip Webb */ @Component -public class ExampleWebMvcConfigurer extends WebMvcConfigurerAdapter { +public class ExampleWebMvcConfigurer implements WebMvcConfigurer { @Override public void addArgumentResolvers( diff --git a/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java b/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java index fb46e1348d0..142966d1c7d 100644 --- a/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java @@ -52,7 +52,7 @@ import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import static org.assertj.core.api.Assertions.assertThat; @@ -128,7 +128,7 @@ public class ErrorPageFilterIntegrationTests { } @Controller - public static class HelloWorldController extends WebMvcConfigurerAdapter { + public static class HelloWorldController implements WebMvcConfigurer { private int status;