Partner – Orkes – NPI EA (cat=Spring)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

Partner – Orkes – NPI EA (tag=Microservices)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

eBook – Guide Spring Cloud – NPI EA (cat=Spring Cloud)
announcement - icon

Let's get started with a Microservice Architecture with Spring Cloud:

>> Join Pro and download the eBook

eBook – Mockito – NPI EA (tag = Mockito)
announcement - icon

Mocking is an essential part of unit testing, and the Mockito library makes it easy to write clean and intuitive unit tests for your Java code.

Get started with mocking and improve your application tests using our Mockito guide:

Download the eBook

eBook – Java Concurrency – NPI EA (cat=Java Concurrency)
announcement - icon

Handling concurrency in an application can be a tricky process with many potential pitfalls. A solid grasp of the fundamentals will go a long way to help minimize these issues.

Get started with understanding multi-threaded applications with our Java Concurrency guide:

>> Download the eBook

eBook – Reactive – NPI EA (cat=Reactive)
announcement - icon

Spring 5 added support for reactive programming with the Spring WebFlux module, which has been improved upon ever since. Get started with the Reactor project basics and reactive programming in Spring Boot:

>> Join Pro and download the eBook

eBook – Java Streams – NPI EA (cat=Java Streams)
announcement - icon

Since its introduction in Java 8, the Stream API has become a staple of Java development. The basic operations like iterating, filtering, mapping sequences of elements are deceptively simple to use.

But these can also be overused and fall into some common pitfalls.

To get a better understanding on how Streams work and how to combine them with other language features, check out our guide to Java Streams:

>> Join Pro and download the eBook

eBook – Jackson – NPI EA (cat=Jackson)
announcement - icon

Do JSON right with Jackson

Download the E-book

eBook – HTTP Client – NPI EA (cat=Http Client-Side)
announcement - icon

Get the most out of the Apache HTTP Client

Download the E-book

eBook – Maven – NPI EA (cat = Maven)
announcement - icon

Get Started with Apache Maven:

Download the E-book

eBook – Persistence – NPI EA (cat=Persistence)
announcement - icon

Working on getting your persistence layer right with Spring?

Explore the eBook

eBook – RwS – NPI EA (cat=Spring MVC)
announcement - icon

Building a REST API with Spring?

Download the E-book

Course – LS – NPI EA (cat=Jackson)
announcement - icon

Get started with Spring and Spring Boot, through the Learn Spring course:

>> LEARN SPRING
Course – RWSB – NPI EA (cat=REST)
announcement - icon

Explore Spring Boot 3 and Spring 6 in-depth through building a full REST API with the framework:

>> The New “REST With Spring Boot”

Course – LSS – NPI EA (cat=Spring Security)
announcement - icon

Yes, Spring Security can be complex, from the more advanced functionality within the Core to the deep OAuth support in the framework.

I built the security material as two full courses - Core and OAuth, to get practical with these more complex scenarios. We explore when and how to use each feature and code through it on the backing project.

You can explore the course here:

>> Learn Spring Security

Partner – LambdaTest – NPI EA (cat=Testing)
announcement - icon

Browser testing is essential if you have a website or web applications that users interact with. Manual testing can be very helpful to an extent, but given the multiple browsers available, not to mention versions and operating system, testing everything manually becomes time-consuming and repetitive.

To help automate this process, Selenium is a popular choice for developers, as an open-source tool with a large and active community. What's more, we can further scale our automation testing by running on theLambdaTest cloud-based testing platform.

Read more through our step-by-step tutorial on how to set up Selenium tests with Java and run them on LambdaTest:

>> Automated Browser Testing With Selenium

Partner – Orkes – NPI EA (cat=Java)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

Course – LSD – NPI EA (tag=Spring Data JPA)
announcement - icon

Spring Data JPA is a great way to handle the complexity of JPA with the powerful simplicity of Spring Boot.

Get started with Spring Data JPA through the guided reference course:

>> CHECK OUT THE COURSE

Partner – Moderne – NPI EA (cat=Spring Boot)
announcement - icon

Refactor Java code safely — and automatically — with OpenRewrite.

Refactoring big codebases by hand is slow, risky, and easy to put off. That’s where OpenRewrite comes in. The open-source framework for large-scale, automated code transformations helps teams modernize safely and consistently.

Each month, the creators and maintainers of OpenRewrite at Moderne run live, hands-on training sessions — one for newcomers and one for experienced users. You’ll see how recipes work, how to apply them across projects, and how to modernize code with confidence.

Join the next session, bring your questions, and learn how to automate the kind of work that usually eats your sprint time.

Course – LSS – NPI (cat=Spring Security)
announcement - icon

If you're working on a Spring Security (and especially an OAuth) implementation, definitely have a look at the Learn Spring Security course:

>> LEARN SPRING SECURITY

1. Introduction

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.

We’ll explore classes starting from Spring 4 and Spring Boot 1.4.

2. Deprecated Classes in 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.

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:

  • 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.

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.

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:

  • 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.

2.4. Spring 4.3.x

This version of Spring brought lots of deprecated classes:

  • 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:

  • 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:

  • 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:

  • 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:

  • 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.

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:

  • 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.

2.6. Spring 5.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:

  • 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:

  • 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:

  • 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.

3. Deprecated Classes in Spring Boot

Now, let’s take a look at the deprecated classes in Spring Boot back to version 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.

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:

  • 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.

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:

  • 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.

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.

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.

4. Conclusion

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.

Baeldung Pro – NPI EA (cat = Baeldung)
announcement - icon

Baeldung Pro comes with both absolutely No-Ads as well as finally with Dark Mode, for a clean learning experience:

>> Explore a clean Baeldung

Once the early-adopter seats are all used, the price will go up and stay at $33/year.

Partner – Orkes – NPI EA (cat = Spring)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

Partner – Orkes – NPI EA (tag = Microservices)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

eBook – HTTP Client – NPI EA (cat=HTTP Client-Side)
announcement - icon

The Apache HTTP Client is a very robust library, suitable for both simple and advanced use cases when testing HTTP endpoints. Check out our guide covering basic request and response handling, as well as security, cookies, timeouts, and more:

>> Download the eBook

eBook – Java Concurrency – NPI EA (cat=Java Concurrency)
announcement - icon

Handling concurrency in an application can be a tricky process with many potential pitfalls. A solid grasp of the fundamentals will go a long way to help minimize these issues.

Get started with understanding multi-threaded applications with our Java Concurrency guide:

>> Download the eBook

eBook – Java Streams – NPI EA (cat=Java Streams)
announcement - icon

Since its introduction in Java 8, the Stream API has become a staple of Java development. The basic operations like iterating, filtering, mapping sequences of elements are deceptively simple to use.

But these can also be overused and fall into some common pitfalls.

To get a better understanding on how Streams work and how to combine them with other language features, check out our guide to Java Streams:

>> Join Pro and download the eBook

eBook – Persistence – NPI EA (cat=Persistence)
announcement - icon

Working on getting your persistence layer right with Spring?

Explore the eBook

Course – LS – NPI EA (cat=REST)

announcement - icon

Get started with Spring Boot and with core Spring, through the Learn Spring course:

>> CHECK OUT THE COURSE

Partner – Moderne – NPI EA (tag=Refactoring)
announcement - icon

Modern Java teams move fast — but codebases don’t always keep up. Frameworks change, dependencies drift, and tech debt builds until it starts to drag on delivery. OpenRewrite was built to fix that: an open-source refactoring engine that automates repetitive code changes while keeping developer intent intact.

The monthly training series, led by the creators and maintainers of OpenRewrite at Moderne, walks through real-world migrations and modernization patterns. Whether you’re new to recipes or ready to write your own, you’ll learn practical ways to refactor safely and at scale.

If you’ve ever wished refactoring felt as natural — and as fast — as writing code, this is a good place to start.

Course – LSS – NPI (cat=Security/Spring Security)
announcement - icon

I just announced the new Learn Spring Security course, including the full material focused on the new OAuth2 stack in Spring Security:

>> CHECK OUT THE COURSE

eBook Jackson – NPI EA – 3 (cat = Jackson)