|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2014 the original author or authors.
|
|
|
|
|
* Copyright 2012-2015 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.
|
|
|
|
@ -155,10 +155,18 @@ public class DispatcherServletAutoConfigurationTests {
|
|
|
|
|
DispatcherServletAutoConfiguration.class);
|
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context,
|
|
|
|
|
"spring.mvc.throw-exception-if-no-handler-found:true");
|
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context,
|
|
|
|
|
"spring.mvc.dispatch-options-request:true");
|
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context,
|
|
|
|
|
"spring.mvc.dispatch-trace-request:true");
|
|
|
|
|
this.context.refresh();
|
|
|
|
|
DispatcherServlet bean = this.context.getBean(DispatcherServlet.class);
|
|
|
|
|
assertEquals(true, new DirectFieldAccessor(bean)
|
|
|
|
|
.getPropertyValue("throwExceptionIfNoHandlerFound"));
|
|
|
|
|
assertEquals(true,
|
|
|
|
|
new DirectFieldAccessor(bean).getPropertyValue("dispatchOptionsRequest"));
|
|
|
|
|
assertEquals(true,
|
|
|
|
|
new DirectFieldAccessor(bean).getPropertyValue("dispatchTraceRequest"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
|