Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
c2e5fd03
Commit
c2e5fd03
authored
Apr 24, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace usage of WebMvcConfigurerAdapter
Closes gh-8964
parent
ec57c3d9
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
45 additions
and
46 deletions
+45
-46
AbstractMvcEndpoint.java
...mework/boot/actuate/endpoint/mvc/AbstractMvcEndpoint.java
+3
-3
Neo4jDataAutoConfiguration.java
.../autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java
+3
-3
SpringDataWebAutoConfiguration.java
...utoconfigure/data/web/SpringDataWebAutoConfiguration.java
+2
-2
DeviceResolverAutoConfiguration.java
...autoconfigure/mobile/DeviceResolverAutoConfiguration.java
+2
-2
SitePreferenceAutoConfiguration.java
...autoconfigure/mobile/SitePreferenceAutoConfiguration.java
+2
-2
JpaBaseConfiguration.java
...work/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java
+3
-3
OAuth2AutoConfiguration.java
...utoconfigure/security/oauth2/OAuth2AutoConfiguration.java
+2
-2
WebMvcAutoConfiguration.java
...ot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java
+5
-5
WebMvcAutoConfigurationTests.java
...toconfigure/web/servlet/WebMvcAutoConfigurationTests.java
+4
-4
SampleAtmosphereApplication.java
...n/java/sample/atmosphere/SampleAtmosphereApplication.java
+2
-2
WebConfig.java
...al/src/main/java/sample/traditional/config/WebConfig.java
+2
-2
SampleMethodSecurityApplication.java
...mple/security/method/SampleMethodSecurityApplication.java
+2
-2
SampleWebSecureCustomApplication.java
...e/web/secure/custom/SampleWebSecureCustomApplication.java
+2
-2
SampleGithubSecureApplication.java
...mple/web/secure/github/SampleGithubSecureApplication.java
+2
-2
SampleWebSecureJdbcApplication.java
...ample/web/secure/jdbc/SampleWebSecureJdbcApplication.java
+2
-2
SampleWebSecureApplication.java
...in/java/sample/web/secure/SampleWebSecureApplication.java
+2
-2
WebMvcTypeExcludeFilterTests.java
...toconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java
+2
-2
ExampleWebMvcConfigurer.java
...onfigure/web/servlet/mockmvc/ExampleWebMvcConfigurer.java
+1
-2
ErrorPageFilterIntegrationTests.java
.../web/servlet/support/ErrorPageFilterIntegrationTests.java
+2
-2
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/AbstractMvcEndpoint.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
({
WebMvcConfigurer
Adapter
.
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
WebMvcConfigurerAdapt
er
{
protected
static
class
Neo4jWebMvcConfiguration
implements
WebMvcConfigur
er
{
@Bean
public
OpenSessionInViewInterceptor
neo4jOpenSessionInViewInterceptor
()
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
,
WebMvcConfigurer
Adapter
.
class
})
WebMvcConfigurer
.
class
})
@ConditionalOnMissingBean
(
PageableHandlerMethodArgumentResolver
.
class
)
@AutoConfigureAfter
(
RepositoryRestMvcAutoConfiguration
.
class
)
public
class
SpringDataWebAutoConfiguration
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceResolverAutoConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
WebMvcConfigurerAdapt
er
{
implements
WebMvcConfigur
er
{
private
DeviceResolverHandlerInterceptor
deviceResolverHandlerInterceptor
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/SitePreferenceAutoConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
WebMvcConfigurerAdapt
er
{
implements
WebMvcConfigur
er
{
private
final
SitePreferenceHandlerInterceptor
sitePreferenceHandlerInterceptor
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
(
WebMvcConfigurer
Adapter
.
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
WebMvcConfigurerAdapt
er
{
protected
static
class
JpaWebMvcConfiguration
implements
WebMvcConfigur
er
{
@Bean
public
OpenEntityManagerInViewInterceptor
openEntityManagerInViewInterceptor
()
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
,
WebMvcConfigurer
Adapter
.
class
})
@ConditionalOnClass
({
OAuth2AccessToken
.
class
,
WebMvcConfigurer
.
class
})
@Import
({
OAuth2AuthorizationServerConfiguration
.
class
,
OAuth2MethodSecurityConfiguration
.
class
,
OAuth2ResourceServerConfiguration
.
class
,
OAuth2RestOperationsConfiguration
.
class
})
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
,
WebMvcConfigurer
Adapter
.
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 WebMvcConfigurer
Adapter
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
WebMvcConfigurerAdapt
er
{
public
static
class
WebMvcAutoConfigurationAdapter
implements
WebMvcConfigur
er
{
private
static
final
Log
logger
=
LogFactory
.
getLog
(
WebMvcConfigurer
Adapter
.
class
);
.
getLog
(
WebMvcConfigurer
.
class
);
private
final
ResourceProperties
resourceProperties
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
WebMvcConfigurerAdapt
er
{
protected
static
class
WebJars
implements
WebMvcConfigur
er
{
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
...
...
@@ -845,7 +845,7 @@ public class WebMvcAutoConfigurationTests {
}
@Configuration
protected
static
class
AllResources
extends
WebMvcConfigurerAdapt
er
{
protected
static
class
AllResources
implements
WebMvcConfigur
er
{
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
...
...
@@ -976,7 +976,7 @@ public class WebMvcAutoConfigurationTests {
}
@Configuration
protected
static
class
ValidatorWebMvcConfigurer
extends
WebMvcConfigurerAdapt
er
{
protected
static
class
ValidatorWebMvcConfigurer
implements
WebMvcConfigur
er
{
@Override
public
Validator
getValidator
()
{
...
...
spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@SpringBootConfiguration
@EnableAutoConfiguration
...
...
@@ -60,7 +60,7 @@ public class SampleAtmosphereApplication {
}
@Configuration
static
class
MvcConfiguration
extends
WebMvcConfigurerAdapt
er
{
static
class
MvcConfiguration
implements
WebMvcConfigur
er
{
@Override
public
void
addViewControllers
(
ViewControllerRegistry
registry
)
{
...
...
spring-boot-samples/spring-boot-sample-traditional/src/main/java/sample/traditional/config/WebConfig.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.view.InternalResourceViewResolver
;
@EnableWebMvc
@ComponentScan
@Configuration
public
class
WebConfig
extends
WebMvcConfigurerAdapt
er
{
public
class
WebConfig
implements
WebMvcConfigur
er
{
@Override
public
void
addViewControllers
(
ViewControllerRegistry
registry
)
{
...
...
spring-boot-samples/spring-boot-sample-web-method-security/src/main/java/sample/security/method/SampleMethodSecurityApplication.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@SpringBootApplication
@EnableGlobalMethodSecurity
(
securedEnabled
=
true
)
public
class
SampleMethodSecurityApplication
extends
WebMvcConfigurerAdapt
er
{
public
class
SampleMethodSecurityApplication
implements
WebMvcConfigur
er
{
@Controller
protected
static
class
HomeController
{
...
...
spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@SpringBootApplication
@Controller
public
class
SampleWebSecureCustomApplication
extends
WebMvcConfigurerAdapt
er
{
public
class
SampleWebSecureCustomApplication
implements
WebMvcConfigur
er
{
@GetMapping
(
"/"
)
public
String
home
(
Map
<
String
,
Object
>
model
)
{
...
...
spring-boot-samples/spring-boot-sample-web-secure-github/src/main/java/sample/web/secure/github/SampleGithubSecureApplication.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@SpringBootApplication
@EnableOAuth2Sso
public
class
SampleGithubSecureApplication
extends
WebMvcConfigurerAdapt
er
{
public
class
SampleGithubSecureApplication
implements
WebMvcConfigur
er
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SpringApplication
.
run
(
SampleGithubSecureApplication
.
class
,
args
);
...
...
spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/java/sample/web/secure/jdbc/SampleWebSecureJdbcApplication.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@SpringBootApplication
@Controller
public
class
SampleWebSecureJdbcApplication
extends
WebMvcConfigurerAdapt
er
{
public
class
SampleWebSecureJdbcApplication
implements
WebMvcConfigur
er
{
@GetMapping
(
"/"
)
public
String
home
(
Map
<
String
,
Object
>
model
)
{
...
...
spring-boot-samples/spring-boot-sample-web-secure/src/main/java/sample/web/secure/SampleWebSecureApplication.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@SpringBootApplication
@Controller
public
class
SampleWebSecureApplication
extends
WebMvcConfigurerAdapt
er
{
public
class
SampleWebSecureApplication
implements
WebMvcConfigur
er
{
@GetMapping
(
"/"
)
public
String
home
(
Map
<
String
,
Object
>
model
)
{
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
WebMvcConfigurerAdapt
er
{
static
class
ExampleWeb
implements
WebMvcConfigur
er
{
}
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcConfigurer.java
View file @
c2e5fd03
...
...
@@ -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
WebMvcConfigurerAdapt
er
{
public
class
ExampleWebMvcConfigurer
implements
WebMvcConfigur
er
{
@Override
public
void
addArgumentResolvers
(
...
...
spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java
View file @
c2e5fd03
...
...
@@ -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.WebMvcConfigurer
Adapter
;
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
WebMvcConfigurerAdapt
er
{
public
static
class
HelloWorldController
implements
WebMvcConfigur
er
{
private
int
status
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment