Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Brian Clozel, Spring Framework committer, Pivotal Software inc. @brianclozel Intro to Spring Boot Et merci à Stéphane Nicoll (@snicoll) pour ses slides!
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 5 @brianclozel Brian Clozel spring.io/team/bclozel
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ We <3 Spring because § Great programming model § 10+ years of open source § Strong commitment to enterprise apps § Spring portfolio § Always thinking ahead 6
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 8 “Spring Boot lets you pair-program with the Spring team. Josh Long, @starbuxman
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ಠ_ಠ Spring Boot is NOT § A prototyping tool § Only for embedded container apps § Sub-par Spring experience § For Spring beginners only 9
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot - Spring portfolio 10
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot § Single point of focus § Get you started very quickly with Spring § Common non-functional requirements for a "real" application § Exposes a lot of useful features by default § Gets out of the way quickly if you want to change defaults § An opportunity for Spring to be opinionated 11
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring 4 - @Conditional 12 @Conditional(CustomCondition.class) @Configuration public class AppConfiguration { }
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Boot - @EnableAutoConfiguration 13 @Configuration @EnableAutoConfiguration class HomeController { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); } }
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Boot - AutoConfiguration examples 14 @Configuration @ConditionalOnClass(ObjectMapper.class) class JacksonObjectMapperAutoConfiguration { } @Configuration @ConditionalOnMissingBean(name = "groovyTemplateViewResolver") public GroovyTemplateViewResolver groovyTemplateViewResolver { }
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot Starters § Standard Maven POMs, build.gradle files § Takes care of recommended dependencies 15 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> compile("org.springframework.boot:spring-boot- starter-web")
Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ SPRING BOOT
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Quickstart with start.spring.io 17
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ http://spring.io - Boot is ready for prime time! 19 http://github.com/spring-io/sagan
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ JDK8 + Spring Framework 4 + Spring Boot 20 Your next application?