SlideShare a Scribd company logo
1 of 25
© 2013 Spring, by Pivotal
Zero Effort Spring: An intro to Spring Boot
Scott Deeg, Sr. Field Engineer, Pivotal
sdeeg@gopivotal.com
22
Agenda
Goal: Introduce developers to Spring Boot, an opinionated way to rapidly
build production grade Spring applications quickly and with minimal fuss.
 Introduction to Spring Boot
• Where it fits in the Spring eco system
• Goals, high level features, etc.
 Demo: Quick Start
 Behind the scenes
 More demos, more Boot
 End bits (links and such)
 ToDo: Adding new features to Boot
33
What is Pivotal?
 Vmware and EMC spin out
• vFabric from vmware
• Greenplum MPP DB and Hadoop from EMC
• Agile development acquisitions Pivotal Labs and Xtreme Labs
 Paul Maritz CEO
• Former CEO vmware.
 Custodian of various OSS projects including Spring
• and RabbitMQ, Redis, CloudFondry, Groovy/Grails, …
 Commercial interests in Big/Fast Data, PaaS, Enterprise tooling
• Spring is an enabling technology
44
What’s New in Spring
55
Spring vs JEE … ready … FIGHT!
NOT going there! :-)
66
Spring 4.0 Highlights
 Java/EE
• Java 8
• JSR-310 Date/Time API
• JSR-236 Concurrency Utils
• JSR-356 WebSocket
• Servlet 3.1
• Bean Validation 1.1
• JPA 2.1
• JTA 1.2
• JMS 2.0
 Spring iO
 (Large feature set, and getting larger)
77
Big Spring Diagram with Boot
WEB
Controllers, REST,
WebSocket
INTEGRATION
Channels, Adapters,
Filters, Transformers
BATCH
Jobs, Steps,
Readers, Writers
BIG DATA
Ingestion, Export,
Orchestration, Hadoop
DATA
NON-RELATIONALRELATIONAL
CORE
GROOVYFRAMEWORK SECURITY REACTOR
GRAILS
Full-stack, Web
XD
Stream, Taps, Jobs
BOOT
Bootable, Minimal, Ops-Ready
88
Spring Boot
Intro
1010
Goals
 Provide a radically faster and widely accessible getting started
experience
 Be opinionated out of the box, but get out of the way quickly as
requirements start to diverge from the defaults
 Provide a range of non-functional features that are common to large
classes of projects (e.g. embedded servers, security, metrics, health
checks, externalized configuration)
 Absolutely no code generation and no requirement for XML
configuration
 V0.5.0M4
(Question: What about Roo?)
1111
Getting Started REALLY Quickly
app.groovy:
@Controller
class ThisWillActuallyRun
{
@RequestMapping("/")
@ResponseBody
String home() { return "Hello World!" }
}
then
$ spring run app.groovy
1212
Demo
Quick Start
1313
What Just Happened?
 SpringApplication: convenient way to write a main() method that
loads a Spring context
 @EnableAutoConfiguration: optional annotation that adds stuff to
your context, including...
 EmbeddedServletContainerFactory: added to your context if a
server is available on the classpath
 CommandLineRunner: a hook to run application-specific code after
the context is created
 JarLauncher was added to the JAR file
 It’s beginning to look a lot like Java …
1414
Demo
Doing it in Java
1616
Spring Boot Modules
Boot
Autoconfigure
Starters
CLI
Actuator
Tools
Samples
1717
Binding to Command Line Arguments
 SpringApplication binds its own bean properties to command line
arguments, and then adds them to the Spring Environment, e.g.
$ java -jar target/*.jar --server.port=9000
 Externalize Config
• Just put application.properties in your classpath, e.g.
application.properties
server.port: 9000
 Use YAML (if you must)
• Just put application.yml in your classpath
 Both properties and YAML add entries with period-separated paths
to the Spring Environment.
1818
Demo
Change the app behavior by changing parameters
1919
Add a Thymeleaf UI
 Add Thymeleaf to the classpath and see it render a view
 Spring Boot Autoconfigure has added all the boilerplate stuff
 Common configuration options via spring.thymeleaf.*, e.g.
spring.thymeleaf.prefix:classpath:/templates/ (location of templates)
spring.tjymeleaf.cache:true (set to false to reload templates when
changed)
 Extend and override:
add Thymeleaf IDialect beans add thymeleafViewResolver add
SpringTemplateEngine add defaultTemplateResolver
2121
Currently Available Auto-configured Behavior
 Embedded servlet container (Tomcat or Jetty) DataSource and
JdbcTemplate
JPA
Spring Data JPA (scan for repositories) Thymeleaf
 Batch processing
Reactor for events and async processing Actuator features
(Security, Audit, Metrics, Trace)
2222
The Actuator
 Adds common non-functional features to your application and
exposes MVC endpoints to interact with them.
 Security
Secure endpoints: /metrics, /health, /trace, /dump,
 /shutdown, /beans Audit
/info
 If embedded in a web app or web service can use the same port or a
different one (and a different network interface).
2323
Demo
Show me that!
2424
Other
 Security
• Use Actuator
• Can also use Spring Security
 Logging
• Spring Boot provides default configuration files for 3 common logging
frameworks: logback, log4j and java.util.logging
• Starters (and Samples) use logback
External configuration and classpath influence runtime behaviour
LoggingApplicationContextInitializer sets it all up
2525
Does Anybody Use This For Real?
We do
• Spring
Boot app
• Thymeleaf
UI
• Hosted on
Cloud
Foundry
2626
Links
Spring
• https://projects.spring.io/spring-boot
• https://github.com/spring-projects/spring-boot (on Github)
• http://spring.io/blog/2013/09/20/contributing-to-spring-boot-with-a-pull-request
Random Boot Blogs
• http://fbflex.wordpress.com/2013/10/01/a-spring-boot-generator-for-yeoman
© 2013 Spring, by Pivotal
Thanks!
2828
Learn More. Stay Connected.
Download now:
• springsource.org/spring-tool-suite-download (eclipse plugin)
• springsource.org/download/community (zip)
• springsource.org/spring-framework#maven (maven)
Monthly Newsletter: springsource.org/news-events
Twitter: twitter.com/springsource
YouTube: youtube.com/user/SpringSourceDev
RSS Feed: feeds.feedburner.com/springsource/OEVE
LinkedIn: springsource.org/linkedin

More Related Content

What's hot

Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action Alex Movila
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring BootTrey Howard
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
Building a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootBuilding a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootOmri Spector
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVCDzmitry Naskou
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 

What's hot (20)

Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Building a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootBuilding a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring Boot
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 

Similar to Spring boot

Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»DataArt
 
Spring Boot Whirlwind Tour
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind TourVMware Tanzu
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsVMware Tanzu
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupJosh Ghiloni
 
Datasheet weblogicpluginforrd
Datasheet weblogicpluginforrdDatasheet weblogicpluginforrd
Datasheet weblogicpluginforrdMidVision
 
Integrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsIntegrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsDamien Dallimore
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Plone FSR
Plone FSRPlone FSR
Plone FSRfulv
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoringOracle Korea
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringDonghuKIM2
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsmichaelaaron25322
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 StepsStéphane Leroy
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Spring Cloud Data Flow Overview
Spring Cloud Data Flow OverviewSpring Cloud Data Flow Overview
Spring Cloud Data Flow OverviewVMware Tanzu
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison AnalysisClever Moe
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for ChangeEric Wyles
 
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupChase Douglas
 

Similar to Spring boot (20)

Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
 
Spring Boot Whirlwind Tour
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind Tour
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
 
Datasheet weblogicpluginforrd
Datasheet weblogicpluginforrdDatasheet weblogicpluginforrd
Datasheet weblogicpluginforrd
 
Integrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsIntegrating Splunk into your Spring Applications
Integrating Splunk into your Spring Applications
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Spring Cloud Data Flow Overview
Spring Cloud Data Flow OverviewSpring Cloud Data Flow Overview
Spring Cloud Data Flow Overview
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Spring boot
Spring bootSpring boot
Spring boot
 
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Spring boot

  • 1. © 2013 Spring, by Pivotal Zero Effort Spring: An intro to Spring Boot Scott Deeg, Sr. Field Engineer, Pivotal sdeeg@gopivotal.com
  • 2. 22 Agenda Goal: Introduce developers to Spring Boot, an opinionated way to rapidly build production grade Spring applications quickly and with minimal fuss.  Introduction to Spring Boot • Where it fits in the Spring eco system • Goals, high level features, etc.  Demo: Quick Start  Behind the scenes  More demos, more Boot  End bits (links and such)  ToDo: Adding new features to Boot
  • 3. 33 What is Pivotal?  Vmware and EMC spin out • vFabric from vmware • Greenplum MPP DB and Hadoop from EMC • Agile development acquisitions Pivotal Labs and Xtreme Labs  Paul Maritz CEO • Former CEO vmware.  Custodian of various OSS projects including Spring • and RabbitMQ, Redis, CloudFondry, Groovy/Grails, …  Commercial interests in Big/Fast Data, PaaS, Enterprise tooling • Spring is an enabling technology
  • 5. 55 Spring vs JEE … ready … FIGHT! NOT going there! :-)
  • 6. 66 Spring 4.0 Highlights  Java/EE • Java 8 • JSR-310 Date/Time API • JSR-236 Concurrency Utils • JSR-356 WebSocket • Servlet 3.1 • Bean Validation 1.1 • JPA 2.1 • JTA 1.2 • JMS 2.0  Spring iO  (Large feature set, and getting larger)
  • 7. 77 Big Spring Diagram with Boot WEB Controllers, REST, WebSocket INTEGRATION Channels, Adapters, Filters, Transformers BATCH Jobs, Steps, Readers, Writers BIG DATA Ingestion, Export, Orchestration, Hadoop DATA NON-RELATIONALRELATIONAL CORE GROOVYFRAMEWORK SECURITY REACTOR GRAILS Full-stack, Web XD Stream, Taps, Jobs BOOT Bootable, Minimal, Ops-Ready
  • 9. 1010 Goals  Provide a radically faster and widely accessible getting started experience  Be opinionated out of the box, but get out of the way quickly as requirements start to diverge from the defaults  Provide a range of non-functional features that are common to large classes of projects (e.g. embedded servers, security, metrics, health checks, externalized configuration)  Absolutely no code generation and no requirement for XML configuration  V0.5.0M4 (Question: What about Roo?)
  • 10. 1111 Getting Started REALLY Quickly app.groovy: @Controller class ThisWillActuallyRun { @RequestMapping("/") @ResponseBody String home() { return "Hello World!" } } then $ spring run app.groovy
  • 12. 1313 What Just Happened?  SpringApplication: convenient way to write a main() method that loads a Spring context  @EnableAutoConfiguration: optional annotation that adds stuff to your context, including...  EmbeddedServletContainerFactory: added to your context if a server is available on the classpath  CommandLineRunner: a hook to run application-specific code after the context is created  JarLauncher was added to the JAR file  It’s beginning to look a lot like Java …
  • 15. 1717 Binding to Command Line Arguments  SpringApplication binds its own bean properties to command line arguments, and then adds them to the Spring Environment, e.g. $ java -jar target/*.jar --server.port=9000  Externalize Config • Just put application.properties in your classpath, e.g. application.properties server.port: 9000  Use YAML (if you must) • Just put application.yml in your classpath  Both properties and YAML add entries with period-separated paths to the Spring Environment.
  • 16. 1818 Demo Change the app behavior by changing parameters
  • 17. 1919 Add a Thymeleaf UI  Add Thymeleaf to the classpath and see it render a view  Spring Boot Autoconfigure has added all the boilerplate stuff  Common configuration options via spring.thymeleaf.*, e.g. spring.thymeleaf.prefix:classpath:/templates/ (location of templates) spring.tjymeleaf.cache:true (set to false to reload templates when changed)  Extend and override: add Thymeleaf IDialect beans add thymeleafViewResolver add SpringTemplateEngine add defaultTemplateResolver
  • 18. 2121 Currently Available Auto-configured Behavior  Embedded servlet container (Tomcat or Jetty) DataSource and JdbcTemplate JPA Spring Data JPA (scan for repositories) Thymeleaf  Batch processing Reactor for events and async processing Actuator features (Security, Audit, Metrics, Trace)
  • 19. 2222 The Actuator  Adds common non-functional features to your application and exposes MVC endpoints to interact with them.  Security Secure endpoints: /metrics, /health, /trace, /dump,  /shutdown, /beans Audit /info  If embedded in a web app or web service can use the same port or a different one (and a different network interface).
  • 21. 2424 Other  Security • Use Actuator • Can also use Spring Security  Logging • Spring Boot provides default configuration files for 3 common logging frameworks: logback, log4j and java.util.logging • Starters (and Samples) use logback External configuration and classpath influence runtime behaviour LoggingApplicationContextInitializer sets it all up
  • 22. 2525 Does Anybody Use This For Real? We do • Spring Boot app • Thymeleaf UI • Hosted on Cloud Foundry
  • 23. 2626 Links Spring • https://projects.spring.io/spring-boot • https://github.com/spring-projects/spring-boot (on Github) • http://spring.io/blog/2013/09/20/contributing-to-spring-boot-with-a-pull-request Random Boot Blogs • http://fbflex.wordpress.com/2013/10/01/a-spring-boot-generator-for-yeoman
  • 24. © 2013 Spring, by Pivotal Thanks!
  • 25. 2828 Learn More. Stay Connected. Download now: • springsource.org/spring-tool-suite-download (eclipse plugin) • springsource.org/download/community (zip) • springsource.org/spring-framework#maven (maven) Monthly Newsletter: springsource.org/news-events Twitter: twitter.com/springsource YouTube: youtube.com/user/SpringSourceDev RSS Feed: feeds.feedburner.com/springsource/OEVE LinkedIn: springsource.org/linkedin