Share
Embed
Intro to Spring Boot
Short introduction to Spring Boot http://projects.spring.io/spring-boot
Talk presented in JUGs
Brian Clozel
September 23, 2014
Transcript
21 slides
-
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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! -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Show of hands! 2 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ New spring.io website 4 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What’s Spring Boot? 7 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot - Spring portfolio 10 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 { } -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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); } } -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 { } -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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") -
Demo Unless otherwise indicated, these slides are © 2013-2014
Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ SPRING BOOT -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Quickstart with start.spring.io 17 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Boot - Actuator endpoints 18 § autoconfig, beans, mappings § dump, trace, env § health, metrics, info -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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 -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
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? -
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Questions ? 21