|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
- * Copyright 2002-2017 the original author or authors.
|
|
|
|
|
|
+ * Copyright 2020-2022 the original author or authors.
|
|
*
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,9 +13,17 @@
|
|
* See the License for the specific language governing permissions and
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
* limitations under the License.
|
|
*/
|
|
*/
|
|
-
|
|
|
|
package org.springframework.security.config.test;
|
|
package org.springframework.security.config.test;
|
|
|
|
|
|
|
|
+import java.io.Closeable;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+import javax.servlet.Filter;
|
|
|
|
+import javax.servlet.FilterChain;
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
+
|
|
import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
|
|
import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
|
|
import org.springframework.mock.web.MockServletConfig;
|
|
import org.springframework.mock.web.MockServletConfig;
|
|
import org.springframework.mock.web.MockServletContext;
|
|
import org.springframework.mock.web.MockServletContext;
|
|
@@ -32,24 +40,11 @@ import org.springframework.web.context.support.AnnotationConfigWebApplicationCon
|
|
import org.springframework.web.context.support.XmlWebApplicationContext;
|
|
import org.springframework.web.context.support.XmlWebApplicationContext;
|
|
import org.springframework.web.filter.OncePerRequestFilter;
|
|
import org.springframework.web.filter.OncePerRequestFilter;
|
|
|
|
|
|
-import javax.servlet.Filter;
|
|
|
|
-import javax.servlet.FilterChain;
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
-import java.io.Closeable;
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
-
|
|
|
|
import static org.springframework.security.config.BeanIds.SPRING_SECURITY_FILTER_CHAIN;
|
|
import static org.springframework.security.config.BeanIds.SPRING_SECURITY_FILTER_CHAIN;
|
|
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
|
|
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * TODO
|
|
|
|
- * This class is a straight copy from Spring Security.
|
|
|
|
- * It should be removed when merging this codebase into Spring Security.
|
|
|
|
- *
|
|
|
|
* @author Rob Winch
|
|
* @author Rob Winch
|
|
- * @since 5.0
|
|
|
|
*/
|
|
*/
|
|
public class SpringTestContext implements Closeable {
|
|
public class SpringTestContext implements Closeable {
|
|
private Object test;
|
|
private Object test;
|