you up and running as quickly as possible. » • Wraps several Spring projects, many third-party libraries and provides default configurations for each. • Groovy or Java. • Gradle, Maven or CLI. • 1.0.0.RC1 released in January 2014 • http://spring.io runs on Spring Boot! • Boot is not Roo!
+ Spring Boot CLI • Java and Maven: – pom.xml – Spring Boot starters dependencies – A Main class (your application is a jar!) • The pom.xml is your only configuration file!
artifacts 2 XML files 50 lines 0 file Spring Boot 25 lines 31 imported artifacts 2 Java classes 15 lines 0 file What are the minimum prerequisites for a “Hello world” in both cases?
2 XML files 75 lines 1 file 16 lines Set up by user Spring Boot 10 lines 3 JavaConfig classes 15 lines 1 file 3 lines Set up by Spring Boot Often seen as a bottleneck for projects configurations, does Spring Boot enhances persistence layer set up ?
with Jetty – Works only if packaged as a war with embedded Tomcat – Dandelion throws exceptions with JSP and embedded Tomcat Pom.xml Configuration Properties PetClinic 60 lines 2 XML files 75 lines 0 file Spring Boot 25 lines 1 JavaConfig class 20 lines 1 file 2 lines
with JavaConfig just as you do with your Controllers • Profile specific @Configuration classes – JavaConfig simpler than XML. • EhCache @Configuration class – But sometimes, JavaConfig can be non value added… • Logback – Still need an XML file but it’s included in Spring Boot’s parent starter.
the Spring Boot enhanced : @ConditionalOnMissingBean and @ConditionalOnBean. • Add RESTfull monitoring services provided by the actuator starter • Update the application to Java 8 in order to get full advantage of Spring 4. • Add Thymeleaf in order to have Dandelion working. • Let’s do a little startup time test.
use of Spring technologies. • Allows to experiment Spring by coding not by reading books. • Saves days of work at beginning of a new project. • Xml configuration still available. • Doesn’t add aspects and doesn’t generate code. • Production-ready. • Provides RESTfull monitoring services CONS • Not 0% configuration • Java Config can be tricky • Harder to TroubleShoot