Remove outdated Spring version mentions

Close gh-35696
This commit is contained in:
Sébastien Deleuze
2025-10-28 11:47:21 +01:00
parent f07873c966
commit 694224f1a6
51 changed files with 65 additions and 93 deletions
@@ -87,14 +87,12 @@ A crucial difference between Spring pooling and SLSB pooling is that Spring pool
be applied to any POJO. As with Spring in general, this service can be applied in a
non-invasive way.
Spring provides support for Commons Pool 2.2, which provides a
Spring provides support for Commons Pool 2, which provides a
fairly efficient pooling implementation. You need the `commons-pool` Jar on your
application's classpath to use this feature. You can also subclass
`org.springframework.aop.target.AbstractPoolingTargetSource` to support any other
pooling API.
NOTE: Commons Pool 1.5+ is also supported but is deprecated as of Spring Framework 4.2.
The following listing shows an example configuration:
[source,xml,indent=0,subs="verbatim,quotes"]
@@ -1045,10 +1045,10 @@ methods anywhere. However, regular `@Bean` methods in `@Configuration` classes n
to be overridable -- that is, they must not be declared as `private` or `final`.
`@Bean` methods are also discovered on base classes of a given component or
configuration class, as well as on Java 8 default methods declared in interfaces
configuration class, as well as on Java default methods declared in interfaces
implemented by the component or configuration class. This allows for a lot of
flexibility in composing complex configuration arrangements, with even multiple
inheritance being possible through Java 8 default methods as of Spring 4.2.
inheritance being possible through Java default methods.
Finally, a single class may hold multiple `@Bean` methods for the same
bean, as an arrangement of multiple factory methods to use depending on available
@@ -99,7 +99,7 @@ the `@Bean` factory method in favor of any pre-declared constructor on the bean
****
NOTE: We acknowledge that overriding beans in test scenarios is convenient, and there is
explicit support for this as of Spring Framework 6.2. Please refer to
explicit support for this. Please refer to
xref:testing/testcontext-framework/bean-overriding.adoc[this section] for more details.
@@ -327,9 +327,8 @@ Kotlin::
----
======
TIP: Constructor injection in `@Configuration` classes is only supported as of Spring
Framework 4.3. Note also that there is no need to specify `@Autowired` if the target
bean defines only one constructor.
TIP: Note that there is no need to specify `@Autowired` if the target bean defines
only one constructor.
[discrete]
[[beans-java-injecting-imported-beans-fq]]
@@ -9,8 +9,7 @@ objects.
Spring's scripting support primarily targets Groovy and BeanShell. Beyond those
specifically supported languages, the JSR-223 scripting mechanism is supported
for integration with any JSR-223 capable language provider (as of Spring 4.2),
for example, JRuby.
for integration with any JSR-223 capable language provider, for example, JRuby.
You can find fully working examples of where this dynamic language support can be
immediately useful in xref:languages/dynamic.adoc#dynamic-language-scenarios[Scenarios].
@@ -309,7 +309,7 @@ before-transaction method or after-transaction method runs at the appropriate ti
Generally speaking, `@BeforeTransaction` and `@AfterTransaction` methods must not accept
any arguments.
However, as of Spring Framework 6.1, for tests using the
However, for tests using the
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-extension[`SpringExtension`]
with JUnit Jupiter, `@BeforeTransaction` and `@AfterTransaction` methods may optionally
accept arguments which will be resolved by any registered JUnit `ParameterResolver`
@@ -6,8 +6,6 @@
`MultipartResolver` from the `org.springframework.web.multipart` package is a strategy
for parsing multipart requests including file uploads. There is a container-based
`StandardServletMultipartResolver` implementation for Servlet multipart request parsing.
Note that the outdated `CommonsMultipartResolver` based on Apache Commons FileUpload is
not available anymore, as of Spring Framework 6.0 with its new Servlet 5.0+ baseline.
To enable multipart handling, you need to declare a `MultipartResolver` bean in your
`DispatcherServlet` Spring configuration with a name of `multipartResolver`.
@@ -29,7 +29,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Objenesis-based extension of {@link CglibAopProxy} to create proxy instances
* without invoking the constructor of the class. Used by default as of Spring 4.
* without invoking the constructor of the class. Used by default.
*
* @author Oliver Gierke
* @author Juergen Hoeller
@@ -57,9 +57,8 @@ public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
* A name can specify a prefix to match by ending with "*", for example, "myBean,tx*"
* will match the bean named "myBean" and all beans whose name start with "tx".
* <p><b>NOTE:</b> In case of a FactoryBean, only the objects created by the
* FactoryBean will get proxied. This default behavior applies as of Spring 2.0.
* If you intend to proxy a FactoryBean instance itself (a rare use case, but
* Spring 1.2's default behavior), specify the bean name of the FactoryBean
* FactoryBean will get proxied. If you intend to proxy a FactoryBean instance
* itself (a rare use case), specify the bean name of the FactoryBean
* including the factory-bean prefix "&amp;": for example, "&amp;myFactoryBean".
* @see org.springframework.beans.factory.FactoryBean
* @see org.springframework.beans.factory.BeanFactory#FACTORY_BEAN_PREFIX
@@ -46,8 +46,6 @@ import org.springframework.util.Assert;
* meaningful validation. All exposed Commons Pool properties use the
* corresponding Commons Pool defaults.
*
* <p>Compatible with Apache Commons Pool 2.4, as of Spring 4.2.
*
* @author Rod Johnson
* @author Rob Harrop
* @author Juergen Hoeller
@@ -81,7 +81,7 @@ public interface BeanPostProcessor {
* or a custom init-method). The bean will already be populated with property values.
* The returned bean instance may be a wrapper around the original.
* <p>In case of a FactoryBean, this callback will be invoked for both the FactoryBean
* instance and the objects created by the FactoryBean (as of Spring 2.0). The
* instance and the objects created by the FactoryBean. The
* post-processor can decide whether to apply to either the FactoryBean or created
* objects or both through corresponding {@code bean instanceof FactoryBean} checks.
* <p>This callback will also be invoked after a short-circuiting triggered by a
@@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
* registration of custom {@link PropertyEditor property editors}.
*
* <p>In case you want to register {@link PropertyEditor} instances,
* the recommended usage as of Spring 2.0 is to use custom
* the recommended usage is to use custom
* {@link PropertyEditorRegistrar} implementations that in turn register any
* desired editor instances on a given
* {@link org.springframework.beans.PropertyEditorRegistry registry}. Each
@@ -65,7 +65,7 @@ import org.springframework.beans.factory.InitializingBean;
* Note that the value of "foo" in the first document is not simply replaced
* with the value in the second, but its nested values are merged.
*
* <p>Requires SnakeYAML 2.0 or higher, as of Spring Framework 6.1.
* <p>Requires SnakeYAML 2.0 or higher.
*
* @author Dave Syer
* @author Juergen Hoeller
@@ -50,7 +50,7 @@ import org.springframework.util.StringUtils;
/**
* Base class for YAML factories.
*
* <p>Requires SnakeYAML 2.0 or higher, as of Spring Framework 6.1.
* <p>Requires SnakeYAML 2.0 or higher.
*
* @author Dave Syer
* @author Juergen Hoeller
@@ -75,7 +75,7 @@ import org.springframework.core.CollectionFactory;
* servers[1]=foo.bar.com
* </pre>
*
* <p>Requires SnakeYAML 2.0 or higher, as of Spring Framework 6.1.
* <p>Requires SnakeYAML 2.0 or higher.
*
* @author Dave Syer
* @author Stephane Nicoll
@@ -254,9 +254,8 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* <p>This will only be used as a last resort in case of a circular reference
* that cannot be resolved otherwise: essentially, preferring a raw instance
* getting injected over a failure of the entire bean wiring process.
* <p>Default is "false", as of Spring 2.0. Turn this on to allow for non-wrapped
* raw beans injected into some of your references, which was Spring 1.2's
* (arguably unclean) default behavior.
* <p>Default is "false". Turn this on to allow for non-wrapped
* raw beans injected into some of your references.
* <p><b>NOTE:</b> It is generally recommended to not rely on circular references
* between your beans, in particular with auto-proxying involved.
* @see #setAllowCircularReferences
@@ -330,7 +330,7 @@
list or are supposed to be matched generically by type.
Note: A single generic argument value will just be used once, rather than
potentially matched multiple times (as of Spring 1.1).
potentially matched multiple times.
constructor-arg elements are also used in conjunction with the factory-method
element to construct beans using static or instance factory methods.
@@ -567,7 +567,7 @@
argument list or are supposed to be matched generically by type.
Note: A single generic argument value will just be used once, rather
than potentially matched multiple times (as of Spring 1.1).
than potentially matched multiple times.
constructor-arg elements are also used in conjunction with the
factory-method element to construct beans using static or instance
@@ -195,7 +195,7 @@ class BeanFactoryUtilsTests {
assertThat(beans.get("t2")).isEqualTo(t2);
assertThat(beans.get("t3")).isEqualTo(t3.getObject());
assertThat(beans.get("t4")).isInstanceOf(TestBean.class);
// t3 and t4 are found here as of Spring 2.0, since they are pre-registered
// t3 and t4 are found here, since they are pre-registered
// singleton instances, while testFactory1 and testFactory are *not* found
// because they are FactoryBean definitions that haven't been initialized yet.
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
* operations through Caffeine's {@link AsyncCache}, when provided via the
* {@link #CaffeineCache(String, AsyncCache, boolean)} constructor.
*
* <p>Requires Caffeine 3.0 or higher, as of Spring Framework 6.1.
* <p>Requires Caffeine 3.0 or higher.
*
* @author Ben Manes
* @author Juergen Hoeller
@@ -53,7 +53,7 @@ import org.springframework.util.ObjectUtils;
* {@link AsyncCache}, when configured via {@link #setAsyncCacheMode},
* with early-determined cache misses.
*
* <p>Requires Caffeine 3.0 or higher, as of Spring Framework 6.1.
* <p>Requires Caffeine 3.0 or higher.
*
* @author Ben Manes
* @author Juergen Hoeller
@@ -34,8 +34,6 @@ import org.springframework.util.Assert;
* {@link org.springframework.cache.Cache} implementation on top of a
* {@link Cache javax.cache.Cache} instance.
*
* <p>Note: This class has been updated for JCache 1.0, as of Spring 4.0.
*
* @author Juergen Hoeller
* @author Stephane Nicoll
* @since 3.2
@@ -32,8 +32,6 @@ import org.springframework.util.Assert;
* {@link org.springframework.cache.CacheManager} implementation
* backed by a JCache {@link CacheManager javax.cache.CacheManager}.
*
* <p>Note: This class has been updated for JCache 1.0, as of Spring 4.0.
*
* @author Juergen Hoeller
* @author Stephane Nicoll
* @since 3.2
@@ -34,8 +34,6 @@ import org.springframework.beans.factory.InitializingBean;
* obtaining a pre-defined {@code CacheManager} by name through the standard
* JCache {@link Caching javax.cache.Caching} class.
*
* <p>Note: This class has been updated for JCache 1.0, as of Spring 4.0.
*
* @author Juergen Hoeller
* @since 3.2
* @see javax.cache.Caching#getCachingProvider()
@@ -28,7 +28,7 @@ import org.springframework.util.ReflectionUtils;
* {@link JobFactory} implementation that supports {@link java.lang.Runnable}
* objects as well as standard Quartz {@link org.quartz.Job} instances.
*
* <p>Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
* <p>Compatible with Quartz 2.1.4 and higher.
*
* @author Juergen Hoeller
* @since 2.0
@@ -65,7 +65,7 @@ import org.springframework.util.MethodInvoker;
* You need to implement your own Quartz Job as a thin wrapper for each case
* where you want a persistent job to delegate to a specific service method.
*
* <p>Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
* <p>Compatible with Quartz 2.1.4 and higher.
*
* @author Juergen Hoeller
* @author Alef Arendsen
@@ -51,7 +51,7 @@ import org.springframework.transaction.TransactionStatus;
* <p>For concrete usage, check out the {@link SchedulerFactoryBean} and
* {@link SchedulerAccessorBean} classes.
*
* <p>Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
* <p>Compatible with Quartz 2.1.4 and higher.
*
* @author Juergen Hoeller
* @author Stephane Nicoll
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
* Spring bean-style class for accessing a Quartz Scheduler, i.e. for registering jobs,
* triggers and listeners on a given {@link org.quartz.Scheduler} instance.
*
* <p>Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
* <p>Compatible with Quartz 2.1.4 and higher.
*
* @author Juergen Hoeller
* @since 2.5.6
@@ -80,7 +80,7 @@ import org.springframework.util.CollectionUtils;
* automatically apply to Scheduler operations performed within those scopes.
* Alternatively, you may add transactional advice for the Scheduler itself.
*
* <p>Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
* <p>Compatible with Quartz 2.1.4 and higher.
*
* @author Juergen Hoeller
* @since 18.02.2004
@@ -446,8 +446,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
* Scheduler is usually exclusively intended for access within the Spring context.
* <p>Switch this flag to "true" in order to expose the Scheduler globally.
* This is not recommended unless you have an existing Spring application that
* relies on this behavior. Note that such global exposure was the accidental
* default in earlier Spring versions; this has been fixed as of Spring 2.5.6.
* relies on this behavior.
*/
public void setExposeSchedulerInRepository(boolean exposeSchedulerInRepository) {
this.exposeSchedulerInRepository = exposeSchedulerInRepository;
@@ -36,7 +36,7 @@ import org.springframework.context.ApplicationContextAware;
* as bean property values. If no matching bean property is found, the entry
* is by default simply ignored. This is analogous to QuartzJobBean's behavior.
*
* <p>Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
* <p>Compatible with Quartz 2.1.4 and higher.
*
* @author Juergen Hoeller
* @since 2.0
@@ -151,9 +151,8 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased
* locked in a refresh attempt for a specific cached properties file whereas
* other threads keep returning the old properties for the time being, until
* the refresh attempt has completed.
* <p>Default is "true": this behavior is new as of Spring Framework 4.1,
* minimizing contention between threads. If you prefer the old behavior,
* i.e. to fully block on refresh, switch this flag to "false".
* <p>Default is "true", minimizing contention between threads. If you prefer
* the old behavior, i.e. to fully block on refresh, switch this flag to "false".
* @since 4.1
* @see #setCacheSeconds
*/
@@ -28,7 +28,7 @@ import org.springframework.format.Formatter;
* following JSR-310's parsing rules for an Instant (that is, not using a
* configurable {@link java.time.format.DateTimeFormatter}): accepting the
* default {@code ISO_INSTANT} format as well as {@code RFC_1123_DATE_TIME}
* (which is commonly used for HTTP date header values), as of Spring 4.3.
* (which is commonly used for HTTP date header values).
*
* @author Juergen Hoeller
* @author Andrei Nevedomskii
@@ -35,7 +35,7 @@ import org.springframework.util.function.ThrowingFunction;
* Thanks to Ales Justin and Marius Bogoevici for the initial prototype.
*
* <p>This weaver supports WildFly 13-23 (DelegatingClassFileTransformer) as well as
* WildFly 24+ (DelegatingClassTransformer), as of Spring Framework 6.1.15.
* WildFly 24+ (DelegatingClassTransformer).
*
* @author Costin Leau
* @author Juergen Hoeller
@@ -95,13 +95,6 @@
"local properties", if any, and against the Spring Environment's current set of
PropertySources.
Note that as of Spring 3.1 the system-properties-mode attribute has been removed in
favor of the more flexible PropertySources mechanism. However, applications may
continue to use the 3.0 (and older) versions of the spring-context schema in order
to preserve system-properties-mode behavior. In this case, the traditional
PropertyPlaceholderConfigurer component will be registered instead of the newer
PropertySourcesPlaceholderConfigurer.
See ConfigurableEnvironment javadoc for more information on usage.
]]></xsd:documentation>
<xsd:appinfo>
@@ -35,9 +35,8 @@
Specifies the java.util.Executor instance to use when invoking asynchronous methods.
If not provided, an instance of org.springframework.core.task.SimpleAsyncTaskExecutor
will be used by default.
Note that as of Spring 3.1.2, individual @Async methods may qualify which executor to
use, meaning that the executor specified here acts as a default for all non-qualified
@Async methods.
Note that individual @Async methods may qualify which executor to use, meaning that
the executor specified here acts as a default for all non-qualified @Async methods.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@@ -144,7 +143,7 @@
required even when defining the executor as an inner bean: The executor
won't be directly accessible then but will nevertheless use the specified
id as the thread name prefix of the threads that it manages.
In the case of multiple task:executors, as of Spring 3.1.2 this value may be used to
In the case of multiple task:executors, this value may be used to
qualify which executor should handle a given @Async method, for example, @Async("executorId").
See the Javadoc for the #value attribute of Spring's @Async annotation for details.
]]></xsd:documentation>
@@ -31,7 +31,7 @@ public final class SpringAsmInfo {
/**
* The ASM compatibility version for Spring's ASM visitor implementations:
* currently {@link Opcodes#ASM10_EXPERIMENTAL}, as of Spring Framework 5.3.
* currently {@link Opcodes#ASM10_EXPERIMENTAL}.
*/
public static final int ASM_VERSION = Opcodes.ASM10_EXPERIMENTAL;
@@ -40,7 +40,7 @@ import org.xml.sax.XMLReader;
/**
* Convenience methods for working with the StAX API. Partly historic due to JAXP 1.3
* compatibility; as of Spring 4.0, relying on JAXP 1.4 as included in JDK 1.6 and higher.
* compatibility; relying on JAXP 1.4 as included in JDK 1.6 and higher.
*
* <p>In particular, methods for using StAX ({@code javax.xml.stream}) in combination with
* the TrAX API ({@code javax.xml.transform}), and converting StAX readers/writers into SAX
@@ -214,8 +214,8 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
/**
* Set a {@link ConversionService} for binding JDBC values to bean properties,
* or {@code null} for none.
* <p>Default is a {@link DefaultConversionService}, as of Spring 4.3. This
* provides support for {@code java.time} conversion and other special types.
* <p>Default is a {@link DefaultConversionService}. This provides support for
* {@code java.time} conversion and other special types.
* @since 4.3
* @see #initBeanWrapper(BeanWrapper)
*/
@@ -78,8 +78,8 @@ public class HibernateJpaVendorAdapter extends AbstractJpaVendorAdapter {
public HibernateJpaVendorAdapter() {
this.persistenceProvider = new SpringHibernateJpaPersistenceProvider();
this.entityManagerFactoryInterface = SessionFactory.class; // as of Spring 5.3
this.entityManagerInterface = Session.class; // as of Spring 5.3
this.entityManagerFactoryInterface = SessionFactory.class;
this.entityManagerInterface = Session.class;
}
@@ -22,12 +22,11 @@ import org.springframework.context.ApplicationContext;
* Strategy interface for loading an {@link ApplicationContext} for an integration
* test managed by the Spring TestContext Framework.
*
* <p><strong>NOTE</strong>: as of Spring Framework 6.0, {@code ContextLoader} is
* effectively a marker interface and should not be implemented directly. Implement
* {@link SmartContextLoader} instead of this interface in order to provide support
* for annotated classes, active bean definition profiles, application context
* initializers, and various other features not supported by methods defined in
* the {@code ContextLoader} SPI.
* <p><strong>NOTE</strong>: {@code ContextLoader} is a marker interface and should
* not be implemented directly. Implement {@link SmartContextLoader} instead of this
* interface in order to provide support for annotated classes, active bean definition
* profiles, application context initializers, and various other features not supported
* by methods defined in the {@code ContextLoader} SPI.
*
* <p>Clients of a {@code ContextLoader} should call
* {@link #processLocations(Class, String...) processLocations()} prior to
@@ -57,7 +57,7 @@ import org.springframework.util.Assert;
* {@link SpringRunner}, {@link ContextConfiguration @ContextConfiguration},
* {@link TestExecutionListeners @TestExecutionListeners}, etc.</li>
* <li>If you wish to extend this class and use a runner other than the
* {@link SpringRunner}, as of Spring Framework 4.2 you can use
* {@link SpringRunner}, you can use
* {@link org.springframework.test.context.junit4.rules.SpringClassRule SpringClassRule} and
* {@link org.springframework.test.context.junit4.rules.SpringMethodRule SpringMethodRule}
* and specify your runner of choice via {@link org.junit.runner.RunWith @RunWith(...)}.</li>
@@ -29,7 +29,7 @@ import java.lang.annotation.Target;
* annotation.
*
* <p>Generally speaking, {@code @AfterTransaction} methods must not accept any
* arguments. However, as of Spring Framework 6.1, for tests using the
* arguments. However, for tests using the
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
* with JUnit Jupiter, {@code @AfterTransaction} methods may optionally accept
* arguments which will be resolved by any registered JUnit
@@ -29,7 +29,7 @@ import java.lang.annotation.Target;
* annotation.
*
* <p>Generally speaking, {@code @BeforeTransaction} methods must not accept any
* arguments. However, as of Spring Framework 6.1, for tests using the
* arguments. However, for tests using the
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
* with JUnit Jupiter, {@code @BeforeTransaction} methods may optionally accept
* arguments which will be resolved by any registered JUnit
@@ -303,7 +303,7 @@ public abstract class AbstractPlatformTransactionManager
* outermost transaction boundary. Switch this flag on to cause an
* UnexpectedRollbackException as early as the global rollback-only marker
* has been first detected, even from within an inner transaction boundary.
* <p>Note that, as of Spring 2.0, the fail-early behavior for global
* <p>Note that the fail-early behavior for global
* rollback-only markers has been unified: All transaction managers will by
* default only cause UnexpectedRollbackException at the outermost transaction
* boundary. This allows, for example, to continue unit tests even after an
@@ -54,7 +54,7 @@ import org.springframework.util.Assert;
* <p>Allows to use a pre-configured {@link HttpClient} instance -
* potentially with authentication, HTTP connection pooling, etc.
*
* <p><b>NOTE:</b> Requires Apache HttpComponents 5.1 or higher, as of Spring 6.0.
* <p><b>NOTE:</b> Requires Apache HttpComponents 5.1 or higher.
*
* @author Oleg Kalnichevski
* @author Arjen Poutsma
@@ -57,7 +57,7 @@ import static org.springframework.http.MediaType.TEXT_PLAIN;
* The {@code "application/json"} format is also supported with the {@code "com.google.protobuf:protobuf-java-util"}
* dependency. See {@link ProtobufJsonFormatHttpMessageConverter} for a configurable variant.
*
* <p>This converter requires Protobuf 3 or higher as of Spring Framework 6.1.
* <p>This converter requires Protobuf 3 or higher.
*
* @author Alex Antonov
* @author Brian Clozel
@@ -40,7 +40,7 @@ import org.springframework.web.util.WebUtils;
* callbacks, consider defining a Spring {@link RequestContextListener} in your
* {@code web.xml}.
*
* <p>Requires JSF 2.0 or higher, as of Spring 4.0.
* <p>Requires JSF 2.0 or higher.
*
* @author Juergen Hoeller
* @since 2.5.2
@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
/**
* {@link WebRequest} adapter for a JSF {@link jakarta.faces.context.FacesContext}.
*
* <p>Requires JSF 2.0 or higher, as of Spring 4.0.
* <p>Requires JSF 2.0 or higher.
*
* @author Juergen Hoeller
* @since 2.5.2
@@ -392,7 +392,7 @@ public class RequestContext {
/**
* Is HTML escaping using the response encoding by default?
* If enabled, only XML markup significant characters will be escaped with UTF-* encodings.
* <p>Falls back to {@code true} in case of no explicit default given, as of Spring 4.2.
* <p>Falls back to {@code true} in case of no explicit default given.
* @since 4.1.2
*/
public boolean isResponseEncodedHtmlEscape() {
@@ -86,11 +86,11 @@ import org.springframework.web.servlet.view.AbstractTemplateView;
* {@code "text/html;charset=UTF-8"}. When using {@link FreeMarkerViewResolver}
* to create the view for you, set the
* {@linkplain FreeMarkerViewResolver#setContentType(String) content type}
* directly in the {@code FreeMarkerViewResolver}; however, as of Spring Framework
* 6.2, it is no longer necessary to explicitly set the content type in the
* {@code FreeMarkerViewResolver} if you have set an explicit encoding via either
* {@link #setEncoding(String)}, {@link FreeMarkerConfigurer#setDefaultEncoding(String)},
* or {@link Configuration#setDefaultEncoding(String)}.
* directly in the {@code FreeMarkerViewResolver}; however, it is not necessary to
* explicitly set the content type in the {@code FreeMarkerViewResolver} if you have
* set an explicit encoding via either {@link #setEncoding(String)},
* {@link FreeMarkerConfigurer#setDefaultEncoding(String)}, or
* {@link Configuration#setDefaultEncoding(String)}.
*
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.33 or higher.
*
@@ -36,10 +36,9 @@ import org.springframework.web.servlet.view.AbstractUrlBasedView;
* <p><b>Note:</b> To ensure that the correct encoding is used when the rendering
* the response, set the {@linkplain #setContentType(String) content type} with an
* appropriate {@code charset} attribute &mdash; for example,
* {@code "text/html;charset=UTF-8"}; however, as of Spring Framework 6.2, it is
* no longer strictly necessary to explicitly set the content type in the
* {@code FreeMarkerViewResolver} if you have set an explicit encoding via either
* {@link FreeMarkerView#setEncoding(String)},
* {@code "text/html;charset=UTF-8"}; however, it is not necessary to explicitly set
* the content type in the {@code FreeMarkerViewResolver} if you have set an explicit
* encoding via either {@link FreeMarkerView#setEncoding(String)},
* {@link FreeMarkerConfigurer#setDefaultEncoding(String)}, or
* {@link Configuration#setDefaultEncoding(String)}.
*