Spring started out as an inversion of control container but has expanded in to many useful components:

  • Dependency injection
  • Aspects
  • Spring MVC (for Web development)
  • Authentication and authorization
  • Transaction management

Dependency injection is at the heart of things and is a very useful addition to the Java language. In particular it helps to ensure that code is flexible, extensible and easier to test.

Spring MVC application with Cucumber and Selenium part 2

With the basic application in place it is now time to focus on testing. First up we add a Cucumber acceptance test. It is a good idea to keep your acceptance tests separate from your unit tests, so I tend to run them in the integration-test phase of Maven. To do this use the failsafe plugin, adding something like this to your pom: