It’s quite a neat project, but I found that having to set up the projects involved a bit of copy and paste from the Spring.io guide pages. Wouldn’t it be great if you had an easier tool to deal with project templating and generation?

As an avid user of the Yeoman generator for my Angular projects, I decided to write a small Spring Boot generator that will include the correct starters and help me scaffold my services. At the end, it ended up being very close to the scaffolding functionality available to other tools like Grails and Play.

As a Grails developer, I love the Spock testing framework. Spock is a testing and specification framework that fully leverages groovy to help you write succinct and highly expressive tests. You can read more about Spock in the Framework documentation.

In this post, I want to show how you can use Spock to add easily readable tests for your Spring Boot applications.