Monday, September 5, 2016

Spring Boot

Last weekend I did a coding exercise creating a small Web MVC app with Spring Boot and Spring Data JPA.  Last year I worked through Spring Boot In Action but this was my first real Spring Boot app that went very far beyond Hello World.  I didn't need to write a single line of configuration.  I'm not just saying no XML configuration, no configuration at all.  Spring Data also does a great job of just getting out of the way and letting you work with your database.  I selected Spring Data JPA and HSQLDB from the start page and it just worked with no persistence.xml, no hibernate.cfg.xml or hibernate.properties, nothing.  This really is a game changer in terms of getting you out of the starting gate and focused on your application without having to go through a lot of Spring ceremony first.

Here's one other little thing I noticed.  With the introduction of @SpringBootTest in Spring Boot 1.4 the configuration for an integration test got a bit simpler.  This change is described here: Testing improvements in Spring Boot 1.4.