upgraded to Spring Boot 1.4

Published on Jul 29, 2016, Permalink

Spring Boot 1.4 was released just yesterday: Spring Boot 1.4 released and brings a lot of new features, among them better messages when an applications fails to start and a major overhaul of testing support, with nice support of mocking collaborators.

The EuregJUG just merged its springboot1.4 branch into master for and deployed the current version of the site using a continuous delivery pipeline build with Jenkins, Bitbucket and Sonar to Pivotal CF (Yes, we actually try to use the content of the talks we hear and the books we read).

Here are some interesting links that make use of some new features:

  • Testing slices of your application @WebMvcTest in AssetApiControllerTest (Also take note of AutoConfigureRestDocs, a fine way of configure Spring REST docs), @DataJpaTest in PostRepositoryTest

  • @Autowired can be removed from constructors in all classes (including configurational classes) when there’s a unique constructor (see 5748f08)

  • In IndexControllerTest we make extensive use of the @MockBean annotation which can be used to create mocks for the collaborators of your slice. This works even with asynchronous and transactional services, which are realized via proxies. A special thank you to Andy Wilkinson for realizing that with some help of Spring 4.3.2 in such short time.

  • Speaking of async, we really like the fact how easy it is, to implement asynchronous services with Spring, see this commit for example (but is nothing new with Spring Boot 1.4)

Apart from those changes we added and enforced checkstyle rules, replaced tabs with spaces and have now only 5 "bugs", 21 code smells and zero vulnerabilities within 2049 lines of code according to a default Sonarqube installation. If anyone wants to add some more tests: Feel free.

Contact us