1. Introduction
1.介绍
In this tutorial, we’re going to take a look at the deprecated classes in Spring and Spring Boot and explain what these have been replaced with.
在本教程中,我们将看看Spring和Spring Boot中被废弃的类,并解释这些类被替换成了什么。
We’ll explore classes starting from Spring 4 and Spring Boot 1.4.
我们将从Spring 4和Spring Boot 1.4开始探索类。
2. Deprecated Classes in Spring
2.Spring中被废弃的类
For easier reading, we list classes and their replacements based on the Spring release. And, within each grouping of classes, we’ve sorted them by the class name, irrespective of package.
为了便于阅读,我们根据Spring版本列出了类和它们的替代物。而且,在每个类的分组中,我们都按照类的名称进行排序,而不考虑包的问题。
2.1. Spring 4.0.x
2.1. Spring 4.0.x
- org.springframework.cache.interceptor.DefaultKeyGenerator – replaced by the SimpleKeyGenerator or custom KeyGenerator implementations based on hash codes
- org.springframework.jdbc.support.lob.OracleLobHandler – DefaultLobHandler for the Oracle 10g driver and higher; we should consider it even against the Oracle 9i database
- org.springframework.test.AssertThrows – we should make use of JUnit 4’s @Test(expected=…) support instead
- org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter – AllEncompassingFormHttpMessageConverter
The following class was deprecated as of Spring 4.0.2, in favor of CGLIB 3.1’s default strategy, and was removed in Spring 4.1:
下面这个类从Spring 4.0.2开始被弃用,转而使用CGLIB 3.1的默认策略,并在Spring 4.1中被移除。
- org.springframework.cglib.transform.impl.MemorySafeUndeclaredThrowableStrategy
All deprecated classes, as well as deprecated interfaces, fields, methods, constructors, and enum constants for this Spring version can be found on the official documentation page.
在官方文档页面上可以找到该Spring版本的所有废弃类,以及废弃的接口、字段、方法、构造函数和枚举常量。
2.2. Spring 4.1.x
2.2. Spring 4.1.x
- org.springframework.jdbc.core.simple.ParameterizedBeanPropertyRowMapper – BeanPropertyRowMapper
- org.springframework.jdbc.core.simple.ParameterizedSingleColumnRowMapper – SingleColumnRowMapper
We can find the full list in the Spring 4.1.x JavaDoc.
我们可以在Spring 4.1.x JavaDoc中找到完整的列表。
2.3. Spring 4.2.x
2.3. Spring 4.2.x
- org.springframework.web.servlet.view.document.AbstractExcelView – AbstractXlsView and its AbstractXlsxView and AbstractXlsxStreamingView variants
- org.springframework.format.number.CurrencyFormatter – CurrencyStyleFormatter
- org.springframework.messaging.simp.user.DefaultUserSessionRegistry – we should use the SimpUserRegistry in combination with the ApplicationListener listening for the AbstractSubProtocolEvent events
- org.springframework.messaging.handler.HandlerMethodSelector – generalized and refined MethodIntrospector
- org.springframework.core.JdkVersion – we should perform direct checks for the desired JDK API variants via reflection
- org.springframework.format.number.NumberFormatter – NumberStyleFormatter
- org.springframework.format.number.PercentFormatter – PercentStyleFormatter
- org.springframework.test.context.transaction.TransactionConfigurationAttributes – this class is removed along with the @TransactionConfiguration in Spring 5
- org.springframework.oxm.xmlbeans.XmlBeansMarshaller – following the XMLBeans retirement at Apache
The following classes are deprecated in favor of Apache Log4j 2:
以下的类已被废弃,以支持Apache Log4j 2。
- org.springframework.web.util.Log4jConfigListener
- org.springframework.util.Log4jConfigurer
- org.springframework.web.filter.Log4jNestedDiagnosticContextFilter
- org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor
- org.springframework.web.util.Log4jWebConfigurer
More details are available in the Spring 4.2.x JavaDoc.
更多细节可在Spring 4.2.x JavaDoc中找到。
2.4. Spring 4.3.x
2.4. Spring 4.3.x
This version of Spring brought lots of deprecated classes:
这个版本的Spring带来了很多废弃的类。
- org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice – this class is removed in Spring Framework 5.1; we should use CORS instead
- org.springframework.oxm.castor.CastorMarshaller – deprecated due to the lack of activity on the Castor project
- org.springframework.web.servlet.mvc.method.annotation.CompletionStageReturnValueHandler – DeferredResultMethodReturnValueHandler, which now supports CompletionStage return values via an adapter mechanism
- org.springframework.jdbc.support.incrementer.DB2MainframeSequenceMaxValueIncrementer – renamed to Db2MainframeMaxValueIncrementer
- org.springframework.jdbc.support.incrementer.DB2SequenceMaxValueIncrementer – renamed to Db2LuwMaxValueIncrementer
- org.springframework.core.GenericCollectionTypeResolver – deprecated in favor of direct ResolvableType usage
- org.springframework.web.servlet.mvc.method.annotation.ListenableFutureReturnValueHandler – DeferredResultMethodReturnValueHandler, which now supports ListenableFuture return values via an adapter mechanism
- org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer – we should use PostgresSequenceMaxValueIncrementer instead
- org.springframework.web.servlet.ResourceServlet – ResourceHttpRequestHandler
These classes are deprecated in favor of the HandlerMethod-based MVC infrastructure:
这些类已被废弃,以支持基于HandlerMethod的MVC基础设施。
- org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping
- org.springframework.web.bind.annotation.support.HandlerMethodInvoker
- org.springframework.web.bind.annotation.support.HandlerMethodResolver
Several classes are deprecated in favor of annotation-driven handler methods:
有几个类被弃用,转而使用注解驱动的处理方法。
- org.springframework.web.servlet.mvc.support.AbstractControllerUrlHandlerMapping
- org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
- org.springframework.web.servlet.mvc.support.ControllerBeanNameHandlerMapping
- org.springframework.web.servlet.mvc.multiaction.InternalPathMethodNameResolver
- org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver
- org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver
There are also a lot of classes from Spring that we should replace with their Hibernate 4.x/5.x equivalents:
还有很多Spring的类,我们应该用Hibernate 4.x/5.x的对应类来代替。
- org.springframework.orm.hibernate3.support.AbstractLobType
- org.springframework.orm.hibernate3.AbstractSessionFactoryBean
- org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
- org.springframework.orm.hibernate3.support.BlobByteArrayType
- org.springframework.orm.hibernate3.support.BlobSerializableType
- org.springframework.orm.hibernate3.support.BlobStringType
- org.springframework.orm.hibernate3.support.ClobStringType
- org.springframework.orm.hibernate3.FilterDefinitionFactoryBean
- org.springframework.orm.hibernate3.HibernateAccessor
- org.springframework.orm.hibernate3.support.HibernateDaoSupport
- org.springframework.orm.hibernate3.HibernateExceptionTranslator
- org.springframework.orm.jpa.vendor.HibernateJpaSessionFactoryBean
- org.springframework.orm.hibernate3.HibernateTemplate
- org.springframework.orm.hibernate3.HibernateTransactionManager
- org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener
- org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
- org.springframework.orm.hibernate3.LocalJtaDataSourceConnectionProvider
- org.springframework.orm.hibernate3.LocalRegionFactoryProxy
- org.springframework.orm.hibernate3.LocalSessionFactoryBean
- org.springframework.orm.hibernate3.LocalTransactionManagerLookup
- org.springframework.orm.hibernate3.support.OpenSessionInterceptor
- org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
- org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor
- org.springframework.orm.hibernate3.support.ScopedBeanInterceptor
- org.springframework.orm.hibernate3.SessionFactoryUtils
- org.springframework.orm.hibernate3.SessionHolder
- org.springframework.orm.hibernate3.SpringSessionContext
- org.springframework.orm.hibernate3.SpringTransactionFactory
- org.springframework.orm.hibernate3.TransactionAwareDataSourceConnectionProvider
- org.springframework.orm.hibernate3.TypeDefinitionBean
Several classes are deprecated in favor of FreeMarker:
有几个类被弃用,而采用FreeMarker。
- org.springframework.web.servlet.view.velocity.VelocityConfigurer
- org.springframework.ui.velocity.VelocityEngineFactory
- org.springframework.ui.velocity.VelocityEngineFactoryBean
- org.springframework.ui.velocity.VelocityEngineUtils
- org.springframework.web.servlet.view.velocity.VelocityLayoutView
- org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver
- org.springframework.web.servlet.view.velocity.VelocityToolboxView
- org.springframework.web.servlet.view.velocity.VelocityView
- org.springframework.web.servlet.view.velocity.VelocityViewResolver
These classes are removed in Spring Framework 5.1, and we should use other transports instead:
这些类在Spring Framework 5.1中被移除,我们应该使用其他的传输方式。
- org.springframework.web.socket.sockjs.transport.handler.JsonpPollingTransportHandler
- org.springframework.web.socket.sockjs.transport.handler.JsonpReceivingTransportHandler
Finally, there are also a couple of classes without an appropriate replacement:
最后,还有几个班级没有合适的替代品。
- org.springframework.core.ControlFlowFactory
- org.springframework.util.WeakReferenceMonitor
As usual, the Spring 4.3.x JavaDoc contains the complete list.
像往常一样,Spring 4.3.x JavaDoc包含完整的列表。
2.5. Spring 5.0.x
2.5. Spring 5.0.x
- org.springframework.web.reactive.support.AbstractAnnotationConfigDispatcherHandlerInitializer – deprecated in favor of AbstractReactiveWebInitializer
- org.springframework.web.util.AbstractUriTemplateHandler – DefaultUriBuilderFactory
- org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer – deprecated in favor of simply using the WebSocketMessageBrokerConfigurer, which has default methods, made possible by a Java 8 baseline
- org.springframework.web.client.AsyncRestTemplate – WebClient
- org.springframework.web.context.request.async.CallableProcessingInterceptorAdapter – deprecated since the CallableProcessingInterceptor has default methods
- org.springframework.messaging.support.ChannelInterceptorAdapter – deprecated since the ChannelInterceptor has default methods (made possible by a Java 8 baseline) and can be implemented directly without the need for this no-op adapter
- org.springframework.util.comparator.CompoundComparator – deprecated in favor of the standard JDK 8 Comparator.thenComparing(Comparator)
- org.springframework.web.util.DefaultUriTemplateHandler – DefaultUriBuilderFactory; we should note that the DefaultUriBuilderFactory has a different default value for the parsePath property (changed from false to true)
- org.springframework.web.context.request.async.DeferredResultProcessingInterceptorAdapter – since the DeferredResultProcessingInterceptor has default methods
- org.springframework.util.comparator.InvertibleComparator – deprecated in favor of the standard JDK 8 Comparator.reversed()
- org.springframework.http.client.Netty4ClientHttpRequestFactory – deprecated in favor of ReactorClientHttpConnector
- org.apache.commons.logging.impl.SimpleLog – moved to spring-jcl (effectively equivalent to NoOpLog)
- org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter – WebMvcConfigurer has default methods (made possible by a Java 8 baseline) and can be implemented directly without the need for this adapter
- org.springframework.beans.factory.config.YamlProcessor.StrictMapAppenderConstructor – superseded by SnakeYAML’s own duplicate key handling
We have two classes deprecated in favor of AbstractReactiveWebInitializer:
我们有两个类被弃用,而采用AbstractReactiveWebInitializer。
- org.springframework.web.reactive.support.AbstractDispatcherHandlerInitializer
- org.springframework.web.reactive.support.AbstractServletHttpHandlerAdapterInitializer
And, the following classes don’t have replacements:
而且,下面的班级没有替代者。
- org.springframework.http.client.support.AsyncHttpAccessor
- org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory
- org.springframework.http.client.InterceptingAsyncClientHttpRequestFactory
- org.springframework.http.client.support.InterceptingAsyncHttpAccessor
- org.springframework.mock.http.client.MockAsyncClientHttpRequest
The complete list is available in the Spring 5.0.x JavaDoc.
完整的列表可在Spring 5.0.x JavaDoc中找到。
2.6. Spring 5.1.x
2.6.Spring5.1.x
- org.springframework.http.client.support.BasicAuthorizationInterceptor – deprecated in favor of BasicAuthenticationInterceptor, which reuses the HttpHeaders.setBasicAuth(java.lang.String, java.lang.String) and now shares its default charset ISO-8859-1 instead of using UTF-8 as it did previously
- org.springframework.jdbc.core.BatchUpdateUtils – no longer used by the JdbcTemplate
- org.springframework.web.reactive.function.client.ExchangeFilterFunctions.Credentials – we should use the HttpHeaders.setBasicAuth(String, String) method while building the request
- org.springframework.web.filter.reactive.ForwardedHeaderFilter – this filter is deprecated in favor of using the ForwardedHeaderTransformer, which can be declared as a bean with the name “forwardedHeaderTransformer” or registered explicitly in the WebHttpHandlerBuilder
- org.springframework.jdbc.core.namedparam.NamedParameterBatchUpdateUtils – not used by the NamedParameterJdbcTemplate any more
- org.springframework.core.io.PathResource – FileSystemResource.FileSystemResource(Path)
- org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor – we should use constructor injection for required settings (or a custom InitializingBean implementation)
- org.springframework.remoting.caucho.SimpleHessianServiceExporter – HessianServiceExporter
- org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter – HttpInvokerServiceExporter
- org.springframework.remoting.support.SimpleHttpServerFactoryBean – embedded Tomcat/Jetty/Undertow
- org.springframework.remoting.jaxws.SimpleHttpServerJaxWsServiceExporter – SimpleJaxWsServiceExporter
These are deprecated in favor of EncodedResourceResolver:
这些都被废弃了,取而代之的是EncodedResourceResolver。
- org.springframework.web.reactive.resource.GzipResourceResolver
- org.springframework.web.servlet.resource.GzipResourceResolver
There are several classes that are deprecated in favor of Java EE 7’s DefaultManagedTaskScheduler:
有几个类被弃用,以支持Java EE 7的DefaultManagedTaskScheduler。
- org.springframework.scheduling.commonj.DelegatingTimerListener
- org.springframework.scheduling.commonj.ScheduledTimerListener
- org.springframework.scheduling.commonj.TimerManagerAccessor
- org.springframework.scheduling.commonj.TimerManagerFactoryBean
- org.springframework.scheduling.commonj.TimerManagerTaskScheduler
And, a few are deprecated in favor of Java EE 7’s DefaultManagedTaskExecutor:
而且,有一些已经被废弃,以支持Java EE 7的DefaultManagedTaskExecutor。
- org.springframework.scheduling.commonj.DelegatingWork
- org.springframework.scheduling.commonj.WorkManagerTaskExecutor
Finally, one class is deprecated without a substitute:
最后,有一个类被废弃了,没有替代物。
- org.apache.commons.logging.LogFactoryService
For more details, please see the official Spring 5.1.x JavaDoc on deprecated classes.
有关详细信息,请参见官方的Spring 5.1.x JavaDoc关于废弃的类。
3. Deprecated Classes in Spring Boot
3.Spring Boot中被废弃的类
Now, let’s take a look at the deprecated classes in Spring Boot back to version 1.4.
现在,让我们来看看Spring Boot中被废弃的类回到1.4版本。
We should note here that, for Spring Boot 1.4 and 1.5, most of the replacement classes kept their original names but have been moved to different packages. Therefore, we use fully qualified class names in the next two subsections for both the deprecated and replacement classes.
我们应该注意到,对于Spring Boot 1.4和1.5来说,大多数替换类都保留了原来的名称,但被移到了不同的包中。因此,在接下来的两个小节中,我们对废弃类和替换类都使用完全合格的类名。
3.1. Spring Boot 1.4.x
3.1.Spring Boot 1.4.x
- org.springframework.boot.actuate.system.ApplicationPidFileWriter – deprecated in favor of org.springframework.boot.system.ApplicationPidFileWriter
- org.springframework.boot.yaml.ArrayDocumentMatcher – deprecated in favor of exact String-based matching
- org.springframework.boot.test.ConfigFileApplicationContextInitializer – org.springframework.boot.test.context.ConfigFileApplicationContextInitializer
- org.springframework.boot.yaml.DefaultProfileDocumentMatcher – it is no longer used
- org.springframework.boot.context.embedded.DelegatingFilterProxyRegistrationBean – org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean
- org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter – org.springframework.boot.system.EmbeddedServerPortFileWriter
- org.springframework.boot.test.EnvironmentTestUtils – org.springframework.boot.test.util.EnvironmentTestUtils
- org.springframework.boot.context.embedded.ErrorPage – org.springframework.boot.web.servlet.ErrorPage
- org.springframework.boot.context.web.ErrorPageFilter – org.springframework.boot.web.support.ErrorPageFilter
- org.springframework.boot.context.embedded.FilterRegistrationBean – org.springframework.boot.web.servlet.FilterRegistrationBean
- org.springframework.boot.test.IntegrationTestPropertiesListener – it is no longer used by the @IntegrationTest
- org.springframework.boot.context.embedded.MultipartConfigFactory – org.springframework.boot.web.servlet.MultipartConfigFactory
- org.springframework.boot.context.web.OrderedCharacterEncodingFilter – org.springframework.boot.web.filter.OrderedCharacterEncodingFilter
- org.springframework.boot.context.web.OrderedHiddenHttpMethodFilter – org.springframework.boot.web.filter.OrderedHiddenHttpMethodFilter
- org.springframework.boot.context.web.OrderedHttpPutFormContentFilter – org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter
- org.springframework.boot.context.web.OrderedRequestContextFilter – org.springframework.boot.web.filter.OrderedRequestContextFilter
- org.springframework.boot.test.OutputCapture – org.springframework.boot.test.rule.OutputCapture
- org.springframework.boot.context.web.ServerPortInfoApplicationContextInitializer – org.springframework.boot.context.embedded.ServerPortInfoApplicationContextInitializer
- org.springframework.boot.context.web.ServletContextApplicationContextInitializer – org.springframework.boot.web.support.ServletContextApplicationContextInitializer
- org.springframework.boot.context.embedded.ServletListenerRegistrationBean – org.springframework.boot.web.servlet.ServletListenerRegistrationBean
- org.springframework.boot.context.embedded.ServletRegistrationBean – org.springframework.boot.web.servlet.ServletRegistrationBean
- org.springframework.boot.test.SpringApplicationContextLoader – deprecated in favor of @SpringBootTest; if necessary, we may also use the org.springframework.boot.test.context.SpringBootContextLoader
- org.springframework.boot.test.SpringBootMockServletContext – org.springframework.boot.test.mock.web.SpringBootMockServletContext
- org.springframework.boot.context.web.SpringBootServletInitializer – org.springframework.boot.web.support.SpringBootServletInitializer
- org.springframework.boot.test.TestRestTemplate – org.springframework.boot.test.web.client.TestRestTemplate
Since Velocity support is deprecated in Spring Framework 4.3, the following classes are also deprecated in Spring Boot:
由于Velocity支持在Spring Framework 4.3中被弃用,以下类在Spring Boot中也被弃用。
- org.springframework.boot.web.servlet.view.velocity.EmbeddedVelocityViewResolver
- org.springframework.boot.autoconfigure.velocity.VelocityAutoConfiguration
- org.springframework.boot.autoconfigure.velocity.VelocityAutoConfiguration.VelocityConfiguration
- org.springframework.boot.autoconfigure.velocity.VelocityAutoConfiguration.VelocityNonWebConfiguration
- org.springframework.boot.autoconfigure.velocity.VelocityAutoConfiguration.VelocityWebConfiguration
- org.springframework.boot.autoconfigure.velocity.VelocityProperties
- org.springframework.boot.autoconfigure.velocity.VelocityTemplateAvailabilityProvider
The Spring Boot 1.4.x JavaDoc has the full list.
Spring Boot 1.4.x JavaDoc中有完整的列表。
3.2. Spring Boot 1.5.x
3.2.Spring Boot 1.5.x
- org.springframework.boot.context.event.ApplicationStartedEvent – deprecated in favor of org.springframework.boot.context.event.ApplicationStartingEvent
- org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector – deprecated in favor of org.springframework.boot.autoconfigure.AutoConfigurationImportSelector
- org.springframework.boot.actuate.cache.GuavaCacheStatisticsProvider – following the removal of Guava support in Spring Framework 5
- org.springframework.boot.loader.tools.Layouts.Module – deprecated in favor of a custom LayoutFactory
- org.springframework.boot.autoconfigure.MessageSourceAutoConfiguration – deprecated in favor of org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration
- org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration – deprecated in favor of org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration
- org.springframework.boot.actuate.autoconfigure.ShellProperties – deprecated since CRaSH is not actively maintained
These two classes are deprecated since CRaSH is not actively maintained:
由于CRaSH没有被积极维护,这两个类已经被废弃。
- org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration
- org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration.AuthenticationManagerAdapterConfiguration
There also a few classes without a replacement:
还有几个班级没有人替补。
- org.springframework.boot.autoconfigure.cache.CacheProperties.Hazelcast
- org.springframework.boot.autoconfigure.jdbc.metadata.CommonsDbcpDataSourcePoolMetadata
- org.springframework.boot.autoconfigure.mustache.MustacheCompilerFactoryBean
To see the entire list of what was deprecated, we can consult the official Spring Boot 1.5.x JavaDoc site.
要查看被废弃的内容的整个列表,我们可以查阅官方的Spring Boot 1.5.x JavaDoc网站。
3.3. Spring Boot 2.0.x
3.3 Spring Boot 2.0.x
- org.springframework.boot.test.util.EnvironmentTestUtils – deprecated in favor of TestPropertyValues
- org.springframework.boot.actuate.metrics.web.reactive.server.RouterFunctionMetrics – deprecated in favor of the auto-configured MetricsWebFilter
And one class doesn’t have a substitute:
而有一个班级没有替补。
- org.springframework.boot.actuate.autoconfigure.couchbase.CouchbaseHealthIndicatorProperties
Please check out the deprecated list for Spring Boot 2.0.x for more details.
请查看Spring Boot 2.0.x的废弃列表以了解更多细节。
3.4. Spring Boot 2.1.x
3.4.Spring Boot 2.1.x
- org.springframework.boot.actuate.health.CompositeHealthIndicatorFactory – deprecated in favor of CompositeHealthIndicator.CompositeHealthIndicator(HealthAggregator, HealthIndicatorRegistry)
- org.springframework.boot.actuate.health.CompositeReactiveHealthIndicatorFactory – deprecated in favor of CompositeReactiveHealthIndicator.CompositeReactiveHealthIndicator(HealthAggregator, ReactiveHealthIndicatorRegistry)
Finally, we can consult the complete list of deprecated classes and interfaces in Spring Boot 2.1.x.
最后,我们可以查阅Spring Boot 2.1.x中废弃的类和接口的完整列表。
4. Conclusion
4.结论
In this tutorial, we explored deprecated classes in Spring since version 4 and Spring Boot from version 1.4, along with their corresponding replacements, where available.
在本教程中,我们探讨了Spring自第4版和Spring Boot自1.4版以来被废弃的类,以及它们相应的替代物(如有)。