Over a million developers have joined DZone.

Spring Example Tests for New Developers

A collection of Enterprise Spring Examples and Integration Tests available on GitHub to help anyone new to Spring.

· Java Zone

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

There was a longer gap in my blog because I was busy writing my book Pivotal Certified Spring Enterprise Integration Specialist Exam – A Study Guide. This book is example-heavy. Fortunately, Apress agreed to open source all these examples. Therefore, there is quite an extensive collection of Spring examples available in this GitHub repository. Altogether, there are 146 Spring examples with integration tests.

Most of these examples use Spring Boot, but the book is not focused on this modern framework, therefore there are also plain Spring Framework examples. So it is possible to see how Spring Boot can simplify a Spring developer’s life. Most of the examples are covered with Java and XML configuration (where it made sense), and it provides also good comparison between these two approaches.

Examples cover Enterprise Spring features like:

  • Spring Tasks and Scheduling
  • Spring Remoting (RMI, HttpInvoker, Hessian, Burlap)
  • Spring Web Services (SOAP)
  • REST Services with Spring (Spring MVC and JAX-RS)
  • Spring JMS
  • Spring JMS transactions and acknowledge modes
  • Distributed Transactions with Spring
  • Spring Integration
  • Spring Batch

As I am test infected, I wanted to make sure that the examples were  working. Therefore, an extensive test suite was created, where each example is backed up by integration test. These tests can be useful as ideas for integration testing of Spring applications.

Few examples are used to highlight error handling features of Spring, so there are sometimes errors simulated in example logic. The book would need to fully understand the intentions of these examples. Some examples cover advanced Spring topics (e.g. Distributed Transactions, Spring Batch Remote Chunking, or Spring Batch Remote Partitioning). Examples for these topics are not very common on the web, so these simplistic examples can help grasp advanced these Spring features.

I hope somebody will find this battery of examples and tests valuable and possibly give this book a chance.

Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.

spring,spring batch,spring integration,spring mvc,spring web services,spring boot,jms

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}