ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Getting Familiar
with Spring Boot
Mattias Severson
17th March 2015
Mattias
@mattiasseverson
http://jayway.com/author/mattiasseverson/
Agenda
? Spring Boot
? Getting Started
? Micro Service
? Production Ready Features
? and more¡­
Spring Boot?
Spring Boot makes it easy to create stand-
alone, production-grade Spring based
Applications that you can "just run". We take
an opinionated view of the Spring platform
and third-party libraries so you can get started
with minimum fuss.
Requirements
? Recommended to use Java 8
? Default support of Java 7
? Can use Java 6 with some con?g
Maturity
? Announced in Sept 2013
? 1.0 released April 2014
? Latest release 1.2.2 February 2015
? Built on Spring 4.1.x
Spring Initializr
http://start.spring.io/
Starter POMs
spring-boot-starter-*
? spring-boot-starter-web
? spring-boot-starter-security
? spring-boot-starter-data-mongodb
? spring-boot-starter-websocket
? spring-boot-starter-social-facebook
? 40+ in total
Bean Magic
@SpringBootApplication
@Con?guration
@ComponentScan
@EnableAutoCon?guration
@EnableAutoConfiguration
@Conditional
@ConditionalOnClass
@ConditionalOnBean
@ConditionalOnMissingBean
Micro Service
? Little (own) code required
? ~10 MB disc (incl Embedded Tomcat)
? ~300 MB memory (incl Tomcat)
Production Ready
¡°Feature complete¡±
is not the same as
¡°production ready¡±
Actuator
? Metrics
? Health Check
? Environment
? Trace
? ¡­
Logging
? Logback by default
? Log rotation
? Prede?ned format
? Con?gurable location and ?lename
Configurable
? server.port=8090
? server.session-timeout=30
? security.user.name=admin
? spring.http.gzip.*
? and much more¡­
More Features
? Externalized Con?guration
? CommandLineRunner
? Application Events and Listeners
? MessageChannel
? DB Schema Migration
? ¡­
View Support
Supported Template Engines:
? FreeMarker
? Groovy Templates
? Thymeleaf
? Velocity
? Mustache
References
Spring Initializr http://start.spring.io/
Spring Guides http://spring.io/guides/
Spring Boot
Reference Guide
http://docs.spring.io/spring-boot/
docs/current/reference/htmlsingle/
@mattiasseverson
http://jayway.com/author/mattiasseverson/

More Related Content

"Getting familiar with Spring Boot", jDays 2015 Speaker: "Mattias Severson"