File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
config/src/test/java/org/springframework/security/config/test Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 17
17
package org .springframework .security .config .test ;
18
18
19
19
import org .springframework .beans .factory .annotation .AutowiredAnnotationBeanPostProcessor ;
20
- import org .springframework .context .ConfigurableApplicationContext ;
21
20
import org .springframework .mock .web .MockServletConfig ;
22
21
import org .springframework .mock .web .MockServletContext ;
23
22
import org .springframework .security .config .util .InMemoryXmlWebApplicationContext ;
@@ -113,8 +112,10 @@ private SpringTestContext addFilter(Filter filter) {
113
112
return this ;
114
113
}
115
114
116
- public ConfigurableApplicationContext getContext () {
115
+ public ConfigurableWebApplicationContext getContext () {
117
116
if (!this .context .isRunning ()) {
117
+ this .context .setServletContext (new MockServletContext ());
118
+ this .context .setServletConfig (new MockServletConfig ());
118
119
this .context .refresh ();
119
120
}
120
121
return this .context ;
You can’t perform that action at this time.
0 commit comments