Stop referring to "Spring 3.x" features in documentation and code

This commit is contained in:
Sam Brannen
2023-01-20 11:44:34 +01:00
parent 8f94c4e933
commit 24f18275dd
39 changed files with 225 additions and 238 deletions

View File

@@ -70,10 +70,10 @@ import org.springframework.util.StringUtils;
* load or obtain and hook up a shared parent context to the root application context.
* See the {@link #loadParentContext(ServletContext)} method for more information.
*
* <p>As of Spring 3.1, {@code ContextLoader} supports injecting the root web
* application context via the {@link #ContextLoader(WebApplicationContext)}
* constructor, allowing for programmatic configuration in Servlet initializers.
* See {@link org.springframework.web.WebApplicationInitializer} for usage examples.
* <p>{@code ContextLoader} supports injecting the root web application context
* via the {@link #ContextLoader(WebApplicationContext)} constructor, allowing for
* programmatic configuration in Servlet initializers. See
* {@link org.springframework.web.WebApplicationInitializer} for usage examples.
*
* @author Juergen Hoeller
* @author Colin Sampaleanu

View File

@@ -23,8 +23,8 @@ import jakarta.servlet.ServletContextListener;
* Bootstrap listener to start up and shut down Spring's root {@link WebApplicationContext}.
* Simply delegates to {@link ContextLoader} as well as to {@link ContextCleanupListener}.
*
* <p>As of Spring 3.1, {@code ContextLoaderListener} supports injecting the root web
* application context via the {@link #ContextLoaderListener(WebApplicationContext)}
* <p>{@code ContextLoaderListener} supports injecting the root web application
* context via the {@link #ContextLoaderListener(WebApplicationContext)}
* constructor, allowing for programmatic configuration in Servlet initializers.
* See {@link org.springframework.web.WebApplicationInitializer} for usage examples.
*

View File

@@ -63,8 +63,8 @@ import org.springframework.web.context.ContextLoader;
* ContextLoader and/or "contextClass" init-param for FrameworkServlet must be set to
* the fully-qualified name of this class.
*
* <p>As of Spring 3.1, this class may also be directly instantiated and injected into
* Spring's {@code DispatcherServlet} or {@code ContextLoaderListener} when using the
* <p>This class may also be directly instantiated and injected into Spring's
* {@code DispatcherServlet} or {@code ContextLoaderListener} when using the
* {@link org.springframework.web.WebApplicationInitializer WebApplicationInitializer}
* code-based alternative to {@code web.xml}. See its Javadoc for details and usage examples.
*

View File

@@ -33,9 +33,9 @@ import org.springframework.web.context.ServletContextAware;
* In a purely Spring-based web application, no such linking in of
* ServletContext attributes will be necessary.
*
* <p><b>NOTE:</b> As of Spring 3.0, you may also use the "contextAttributes" default
* bean which is of type Map, and dereference it using an "#{contextAttributes.myKey}"
* expression to access a specific attribute by name.
* <p><b>NOTE:</b> You may also use the "contextAttributes" default bean, which is
* of type Map, and dereference it using a "#{contextAttributes.myKey}" expression
* to access a specific attribute by name.
*
* @author Juergen Hoeller
* @since 1.1.4

View File

@@ -28,8 +28,8 @@ import org.springframework.web.context.ServletContextAware;
* Exposes that ServletContext init parameter when used as bean reference,
* effectively making it available as named Spring bean instance.
*
* <p><b>NOTE:</b> As of Spring 3.0, you may also use the "contextParameters" default
* bean which is of type Map, and dereference it using an "#{contextParameters.myKey}"
* <p><b>NOTE:</b> You may also use the "contextParameters" default bean, which
* is of type Map, and dereference it using a "#{contextParameters.myKey}"
* expression to access a specific parameter by name.
*
* @author Juergen Hoeller

View File

@@ -42,7 +42,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
* be delegated to that bean in the Spring context, which is required to implement
* the standard Servlet Filter interface.
*
* <p>This approach is particularly useful for Filter implementation with complex
* <p>This approach is particularly useful for Filter implementations with complex
* setup needs, allowing to apply the full Spring bean definition machinery to
* Filter instances. Alternatively, consider standard Filter setup in combination
* with looking up service beans from the Spring root application context.
@@ -51,12 +51,13 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
* will by default <i>not</i> be delegated to the target bean, relying on the
* Spring application context to manage the lifecycle of that bean. Specifying
* the "targetFilterLifecycle" filter init-param as "true" will enforce invocation
* of the {@code Filter.init} and {@code Filter.destroy} lifecycle methods
* on the target bean, letting the servlet container manage the filter lifecycle.
* of the {@link Filter#init(jakarta.servlet.FilterConfig)} and
* {@link Filter#destroy()} lifecycle methods on the target bean, letting the
* Servlet container manage the filter lifecycle.
*
* <p>As of Spring 3.1, {@code DelegatingFilterProxy} has been updated to optionally
* accept constructor parameters when using a Servlet container's instance-based filter
* registration methods, usually in conjunction with Spring's
* <p>{@code DelegatingFilterProxy} can optionally accept constructor parameters
* when using a Servlet container's instance-based filter registration methods,
* usually in conjunction with Spring's
* {@link org.springframework.web.WebApplicationInitializer} SPI. These constructors allow
* for providing the delegate Filter bean directly, or providing the application context
* and bean name to fetch, avoiding the need to look up the application context from the

View File

@@ -22,23 +22,11 @@ import org.springframework.core.NestedExceptionUtils;
import org.springframework.lang.Nullable;
/**
* Subclass of {@link ServletException} that properly handles a root cause in terms
* of message and stacktrace, just like NestedChecked/RuntimeException does.
*
* <p>Note that the plain ServletException doesn't expose its root cause at all,
* neither in the exception message nor in printed stack traces! While this might
* be fixed in later Servlet API variants (which even differ per vendor for the
* same API version), it is not reliably available on Servlet 2.4 (the minimum
* version required by Spring 3.x), which is why we need to do it ourselves.
*
* <p>The similarity between this class and the NestedChecked/RuntimeException
* class is unavoidable, as this class needs to derive from ServletException.
* Legacy subclass of {@link ServletException} that handles a root cause in terms
* of message and stacktrace.
*
* @author Juergen Hoeller
* @since 1.2.5
* @see #getMessage
* @see org.springframework.core.NestedCheckedException
* @see org.springframework.core.NestedRuntimeException
* @deprecated as of 6.0, in favor of standard {@link ServletException} nesting
*/
@Deprecated(since = "6.0")