SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
© Copyright 2018 Pivotal Software, Inc. All rights Reserved. Version 1.0
Adam Zwickey
Principal Architect
azwickey@pivotal.io
Spring Boot Whirlwind Tour
Cloud Native?
In the Cloud != Cloud Native
3
In a Container != Cloud Native
4
Cloud Native
Software designed to run and scale
reliably and predictably on top of
potentially unreliable cloud-based
infrastructure
5 Source: Duncan C. E. Winn - Cloud Foundry the Cloud Native Platform
Spring Cloud
Simple and accessible programming
model for the most common
distributed systems and microservice
patterns
● Service Discovery
● Config Management
● Circuit Breakers
● Gateways, Tracing
● AWS, GCP, AZure, K8s
● And more...
Spring & Spring Boot
The world’s #1 enterprise Java
application development framework
and the leading quickstart
microservices engine
● IoC / Dependency Injection
● AOP, Data, Transactions
● HTTP, REST, Reactive, Sockets
● Build, Test, Integrate, Run
● Instrumentation, Scheduling
● And more...
Build Anything Coordinate Anything
INCLUDES INCLUDES
Spring’s Ingredients for Cloud Native
Spring Cloud Data Flow
Cloud native connectors and data
orchestration pipelines for the most
common integration scenarios
● Many, many connectors
● Stream & batch processing
● Host on PCF (PAS & PKS) & K8s
● Simple Spring Flow UI
● Metrics, Health, Insights
● And more...
Connect Anything
INCLUDES
● Fast
Convention-over-configuration, no XML, no code
generation, autoconfigure everything
● Opinionated
But flexible - gets out of the way quickly if you want to
change the defaults
● Portable
Convenient executable JAR packaging
Ready to run with an embedded servlet engine
● Production ready
Works out of the box. Integrated with Cloud Foundry.
Observable “Actuators” for health, metrics etc.
Polyglot (Java, Spring, Groovy, Kotlin)
Build: Spring Boot
Quickstart application context and microservice container
“Working with Spring Boot is like
pair-programming with the Spring team.”
- Josh Long @starbuxman
https://twitter.com/mkheck/status/1001875166660644866
What are Spring Boot starters?
Spring Boot “starters” are dependency packages that work in
harmony with the automatic configuration feature in Spring
Boot to add additional features to your project
When a compatible library is detected, Spring Boot will set about
automatically configuring the components in that starter into
the application’s Spring application context
For example, when the “Actuator” starter is detected, a set of
REST endpoints are added that give you new insights into your
application runtime (such as /actuator/info)
Similarly, when JPA and a Database Driver such as H2 are
detected, Spring Boot will automatically configure an
in-memory H2 database, a JDBC connection pool and an Entity
Manager, all using intelligent defaults
By automatically configuring itself, Spring Boot is relieving the
developer from the toil of bootstrapping the application
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
…
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</parent>
pom.xml
The illustration here is for a Java based Spring Boot application using the
Maven build system, however, Kotlin and Gradle are also supported
What is Spring AutoConfig?
Spring Boot “autoconfiguration” automatically bootstraps your
Spring Application based on the JAR dependencies declared in
your build system
Quickly create new microservices with little configuration yet still
have the ability to customize.
Packaging of Applications
Spring Boot
Packaging of Applications
How do I get started?
The quickest way to get started with Spring Boot is to use the
Spring Initializr at start.spring.io
Here you can choose your preferred build system, your preferred
language, a Spring Boot version, and choose the “starter”
dependencies that you’d like to add to your project
Popular “starter” dependencies include...
● Web (Tomcat, Spring MVC, REST)
● Reactive Web (Netty, Spring WebFlux)
● DevTools (rapid reload for iterative development)
● Thymeleaf (web template engine)
● JPA (Spring Data, ORM and Hibernate)
● Security (Spring Security)
● Actuator (Metrics, Admin, Insights)
Whatever you choose, the resulting Zip file will contain a fully
configured project that’s ready to go!
start.spring.io
You can use Spring Initializr without leaving your favourite IDE!
Spring Tool Suite, NetBeans, VSCode and IntelliJ IDEA Ultimate all feature
Initializr wizards for starting new projects
How do I run Spring Boot apps?
Spring Initializr will add a “Main” class to the project that contains
the @SpringBootApplication annotation and some simple
boilerplate code, as shown opposite
The Initializr will also add a parent project and a spring-boot
plugin dependency to the project’s build file. This allows the
build system to build, package and run the application for you
with just one simple command…
$> ./mvnw spring-boot:run
In the case of applications using the “Web” starter dependency,
Spring Boot will run the application within an embedded
Tomcat server (packaged in a Jar file also known as Fat Jar)
Bootstrapping a Java project and configuring all these
dependencies used to take hours. Now, with Spring Boot, it’s
done in minutes, helping developers everywhere to remain
productive
@SpringBootApplication
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
…
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
MyApplication.java
pom.xml
The illustration here is for a Java based Spring Boot application using the
Maven build system, however, Kotlin and Gradle are also supported
To the Code...
Spring Boot Actuator helps you monitor and manage you
application y enabling production-ready features with no
coding
It provides OOTB endpoints exposing different types of
application information…
● Metrics
● Health
● Configuration
● Errors
● Info
● Threads and HTTP info
Actuator provides dependency management and auto-config for
Micrometer, an application metrics facade that supports
numerous monitoring systems, including: AppOptics, Atlas,
Datadog, Dynatrace, Elastic, Ganglia, Graphite, Humio, Influx, JMX,
KairosDB, New Relic, Prometheus, SignalFx, Simple (in-memory),
StatsD, Wavefront
Spring Boot Actuator
To the Code...
Transforming How The World Builds Software
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
 
Spring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkSpring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-Framework
 
Improving Your Company’s Health with Middleware Takeout
Improving Your Company’s Health with Middleware TakeoutImproving Your Company’s Health with Middleware Takeout
Improving Your Company’s Health with Middleware Takeout
 
What Is Spring?
What Is Spring?What Is Spring?
What Is Spring?
 
Developers Are Users, Too
Developers Are Users, TooDevelopers Are Users, Too
Developers Are Users, Too
 
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonPCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
 
Unleash the True Power of Spring Cloud: Learn How to Customize Spring Cloud
Unleash the True Power of Spring Cloud: Learn How to Customize Spring CloudUnleash the True Power of Spring Cloud: Learn How to Customize Spring Cloud
Unleash the True Power of Spring Cloud: Learn How to Customize Spring Cloud
 
Spring Tools 4: Bootiful Spring Tooling for the Masses
Spring Tools 4: Bootiful Spring Tooling for the MassesSpring Tools 4: Bootiful Spring Tooling for the Masses
Spring Tools 4: Bootiful Spring Tooling for the Masses
 
PKS: The What and How of Enterprise-Grade Kubernetes
PKS: The What and How of Enterprise-Grade KubernetesPKS: The What and How of Enterprise-Grade Kubernetes
PKS: The What and How of Enterprise-Grade Kubernetes
 
Observability Enhancements in Steeltoe
Observability Enhancements in Steeltoe Observability Enhancements in Steeltoe
Observability Enhancements in Steeltoe
 
Connecting Spring Apps to Distributed SQL Clusters Running in Kubernetes
Connecting Spring Apps to Distributed SQL Clusters Running in KubernetesConnecting Spring Apps to Distributed SQL Clusters Running in Kubernetes
Connecting Spring Apps to Distributed SQL Clusters Running in Kubernetes
 
Functions: Implement Once, Execute Anywhere!
Functions: Implement Once, Execute Anywhere!Functions: Implement Once, Execute Anywhere!
Functions: Implement Once, Execute Anywhere!
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDB
 
What Is Spring?
What Is Spring?What Is Spring?
What Is Spring?
 
Spring Boot—Production Boost
Spring Boot—Production BoostSpring Boot—Production Boost
Spring Boot—Production Boost
 
DevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s SolutionDevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s Solution
 
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entitySpring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
 
The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native Applications
 
Spring Cloud Function: Where We Were, Where We Are, and Where We’re Going
Spring Cloud Function: Where We Were, Where We Are, and Where We’re GoingSpring Cloud Function: Where We Were, Where We Are, and Where We’re Going
Spring Cloud Function: Where We Were, Where We Are, and Where We’re Going
 
Pivotal spring boot-cloud workshop
Pivotal   spring boot-cloud workshopPivotal   spring boot-cloud workshop
Pivotal spring boot-cloud workshop
 

Similar a Spring Boot Whirlwind Tour

Module 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to beginModule 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to begin
Deepakprasad838637
 
Chapter6 web apps-tomcat
Chapter6 web apps-tomcatChapter6 web apps-tomcat
Chapter6 web apps-tomcat
Venkat Gowda
 

Similar a Spring Boot Whirlwind Tour (20)

Module 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to beginModule 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to begin
 
Spring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applicationsSpring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applications
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
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
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
 
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
 
Accelerate Spring Apps to Cloud at Scale—Discussion with Azure Spring Cloud C...
Accelerate Spring Apps to Cloud at Scale—Discussion with Azure Spring Cloud C...Accelerate Spring Apps to Cloud at Scale—Discussion with Azure Spring Cloud C...
Accelerate Spring Apps to Cloud at Scale—Discussion with Azure Spring Cloud C...
 
Intro to SpringBatch NoSQL 2021
Intro to SpringBatch NoSQL 2021Intro to SpringBatch NoSQL 2021
Intro to SpringBatch NoSQL 2021
 
Simplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxSimplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptx
 
Chapter6 web apps-tomcat
Chapter6 web apps-tomcatChapter6 web apps-tomcat
Chapter6 web apps-tomcat
 
Spring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionSpring Boot: a Quick Introduction
Spring Boot: a Quick Introduction
 
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
 
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architectureDevoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 

Más de VMware Tanzu

Más de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

Spring Boot Whirlwind Tour

  • 1. © Copyright 2018 Pivotal Software, Inc. All rights Reserved. Version 1.0 Adam Zwickey Principal Architect azwickey@pivotal.io Spring Boot Whirlwind Tour
  • 3. In the Cloud != Cloud Native 3
  • 4. In a Container != Cloud Native 4
  • 5. Cloud Native Software designed to run and scale reliably and predictably on top of potentially unreliable cloud-based infrastructure 5 Source: Duncan C. E. Winn - Cloud Foundry the Cloud Native Platform
  • 6. Spring Cloud Simple and accessible programming model for the most common distributed systems and microservice patterns ● Service Discovery ● Config Management ● Circuit Breakers ● Gateways, Tracing ● AWS, GCP, AZure, K8s ● And more... Spring & Spring Boot The world’s #1 enterprise Java application development framework and the leading quickstart microservices engine ● IoC / Dependency Injection ● AOP, Data, Transactions ● HTTP, REST, Reactive, Sockets ● Build, Test, Integrate, Run ● Instrumentation, Scheduling ● And more... Build Anything Coordinate Anything INCLUDES INCLUDES Spring’s Ingredients for Cloud Native Spring Cloud Data Flow Cloud native connectors and data orchestration pipelines for the most common integration scenarios ● Many, many connectors ● Stream & batch processing ● Host on PCF (PAS & PKS) & K8s ● Simple Spring Flow UI ● Metrics, Health, Insights ● And more... Connect Anything INCLUDES
  • 7. ● Fast Convention-over-configuration, no XML, no code generation, autoconfigure everything ● Opinionated But flexible - gets out of the way quickly if you want to change the defaults ● Portable Convenient executable JAR packaging Ready to run with an embedded servlet engine ● Production ready Works out of the box. Integrated with Cloud Foundry. Observable “Actuators” for health, metrics etc. Polyglot (Java, Spring, Groovy, Kotlin) Build: Spring Boot Quickstart application context and microservice container
  • 8. “Working with Spring Boot is like pair-programming with the Spring team.” - Josh Long @starbuxman
  • 10. What are Spring Boot starters? Spring Boot “starters” are dependency packages that work in harmony with the automatic configuration feature in Spring Boot to add additional features to your project When a compatible library is detected, Spring Boot will set about automatically configuring the components in that starter into the application’s Spring application context For example, when the “Actuator” starter is detected, a set of REST endpoints are added that give you new insights into your application runtime (such as /actuator/info) Similarly, when JPA and a Database Driver such as H2 are detected, Spring Boot will automatically configure an in-memory H2 database, a JDBC connection pool and an Entity Manager, all using intelligent defaults By automatically configuring itself, Spring Boot is relieving the developer from the toil of bootstrapping the application <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> … <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </parent> pom.xml The illustration here is for a Java based Spring Boot application using the Maven build system, however, Kotlin and Gradle are also supported
  • 11. What is Spring AutoConfig? Spring Boot “autoconfiguration” automatically bootstraps your Spring Application based on the JAR dependencies declared in your build system Quickly create new microservices with little configuration yet still have the ability to customize.
  • 13. Spring Boot Packaging of Applications
  • 14. How do I get started? The quickest way to get started with Spring Boot is to use the Spring Initializr at start.spring.io Here you can choose your preferred build system, your preferred language, a Spring Boot version, and choose the “starter” dependencies that you’d like to add to your project Popular “starter” dependencies include... ● Web (Tomcat, Spring MVC, REST) ● Reactive Web (Netty, Spring WebFlux) ● DevTools (rapid reload for iterative development) ● Thymeleaf (web template engine) ● JPA (Spring Data, ORM and Hibernate) ● Security (Spring Security) ● Actuator (Metrics, Admin, Insights) Whatever you choose, the resulting Zip file will contain a fully configured project that’s ready to go! start.spring.io You can use Spring Initializr without leaving your favourite IDE! Spring Tool Suite, NetBeans, VSCode and IntelliJ IDEA Ultimate all feature Initializr wizards for starting new projects
  • 15. How do I run Spring Boot apps? Spring Initializr will add a “Main” class to the project that contains the @SpringBootApplication annotation and some simple boilerplate code, as shown opposite The Initializr will also add a parent project and a spring-boot plugin dependency to the project’s build file. This allows the build system to build, package and run the application for you with just one simple command… $> ./mvnw spring-boot:run In the case of applications using the “Web” starter dependency, Spring Boot will run the application within an embedded Tomcat server (packaged in a Jar file also known as Fat Jar) Bootstrapping a Java project and configuring all these dependencies used to take hours. Now, with Spring Boot, it’s done in minutes, helping developers everywhere to remain productive @SpringBootApplication public class MyApplication { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); } } <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> … <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> MyApplication.java pom.xml The illustration here is for a Java based Spring Boot application using the Maven build system, however, Kotlin and Gradle are also supported
  • 17. Spring Boot Actuator helps you monitor and manage you application y enabling production-ready features with no coding It provides OOTB endpoints exposing different types of application information… ● Metrics ● Health ● Configuration ● Errors ● Info ● Threads and HTTP info Actuator provides dependency management and auto-config for Micrometer, an application metrics facade that supports numerous monitoring systems, including: AppOptics, Atlas, Datadog, Dynatrace, Elastic, Ganglia, Graphite, Humio, Influx, JMX, KairosDB, New Relic, Prometheus, SignalFx, Simple (in-memory), StatsD, Wavefront Spring Boot Actuator
  • 19. Transforming How The World Builds Software © Copyright 2019 Pivotal Software, Inc. All rights Reserved.