Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How to get productive with Spring Boot
Search
Madhura Bhave
October 08, 2019
Technology
0
47
How to get productive with Spring Boot
Madhura Bhave
October 08, 2019
Tweet
Share
More Decks by Madhura Bhave
See All by Madhura Bhave
Breaking the Magician's Code
mbhave
0
510
What's new in Spring boot 2.0 - Spring IO
mbhave
4
2.3k
A Sneak Peek into Spring Boot 2.0
mbhave
3
1.5k
Other Decks in Technology
See All in Technology
ML Pipelineの開発と運用を OpenTelemetryで繋ぐ @ OpenTelemetry Meetup 2025-07
getty708
0
200
ゼロから始めるSREの事業貢献 - 生成AI時代のSRE成長戦略と実践 / Starting SRE from Day One
shinyorke
PRO
0
230
M365アカウント侵害時の初動対応
lhazy
5
4.4k
Maintainer Meetupで「生の声」を聞く ~講演だけじゃないKubeCon
logica0419
1
160
(HackFes)米国国防総省のDevSecOpsライフサイクルをAWSのセキュリティサービスとOSSで実現
syoshie
5
650
Semantic Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
2
380
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
7k
Ktor + Google Cloud Tasks/PubSub におけるOTel Messaging計装の実践
sansantech
PRO
1
230
AWS Well-Architected から考えるオブザーバビリティの勘所 / Considering the Essentials of Observability from AWS Well-Architected
sms_tech
1
840
Step Functions First - サーバーレスアーキテクチャの新しいパラダイム
taikis
1
270
P2P通信の標準化 WebRTCを知ろう
faithandbrave
6
2.2k
Expertise as a Service via MCP
yodakeisuke
1
130
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.1k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Optimizing for Happiness
mojombo
379
70k
Designing for Performance
lara
610
69k
BBQ
matthewcrist
89
9.7k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
Making Projects Easy
brettharned
116
6.3k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
The World Runs on Bad Software
bkeepers
PRO
70
11k
A better future with KSS
kneath
238
17k
Transcript
How to get productive with Spring Boot Madhura Bhave
Agenda • Getting Started • Dependency Management / Starters /
start.spring.io • Development-time • Devtools / Auto-configuration report / Configuration Properties / Testing • Production • Actuator endpoints
Getting Started CODE
Parent POM <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.9.RELEASE</version> </parent>
Parent POM Dependency Management Java Level 1.8 Sensible Plugins Resource
Filtering
Demo Parent POM
Custom Parent POM <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.1.9.RELEASE</version> <type>pom</type>
<scope>import</scope> </dependency> </dependencies> </dependencyManagement>
Gradle Dependency management plugins { id 'org.springframework.boot' version ‘2.1.9.RELEASE' }
apply plugin: 'io.spring.dependency-management'
Demo Starters
Starters • One-stop shop for a set of dependencies •
No copy/paste for common use-cases • Starters are managed dependencies • Community starters
start.spring.io Spring Initializr
Development Time Getting productive during development
Demo Back to the code
Devtools • Automatic Restarts • Condition evaluation delta • Sensible
property defaults • Live reload for static resources
Demo Troubleshoot auto-configuration
Troubleshooting auto-Configuration
Troubleshooting auto-Configuration • Condition Evaluation Report with --DEBUG • Conditions
Endpoint • Use the source • *AutoConfiguration • @Conditional*
Demo Configuration properties
Configuration properties • @Value(${“property”}) are tedious • JSR-303 Validation •
Auto-completion • /configprops endpoint • Now also immutable
Demo Testing
Testing ApplicationContext
Testing ApplicationContext
Testing ApplicationContext ApplicationContext
Testing ApplicationContext ApplicationContext
Testing ApplicationContext @WebFluxTest @WebMvcTest @DataMongoTest @DataJpaTest
Testing • Junit 5 • Testcontainers
Testing Spring Boot Applications https://springoneplatform.io/2019/sessions/ testing-spring-boot-applications
Production
• Why is the app down? • Why does the
app work locally but not in production? • What version of the app is running in production?
Actuator Endpoints • Health • Info • Environment • Runtime
configuration of Loggers • JVM Thread dump
Health Endpoint • Aggregates health indicators • Custom health indicators
can be added • Usage: • Authenticated / Unauthenticated • Health Groups
Info Endpoint • Git Information • Branch / Commit ID
/ Commit time • Build Information • Artifact / Group / Version • Custom Info contributorS
Env Endpoint • Access to the Spring Environment • Shows
• Active profiles • property sources in the order of precedence
Loggers Endpoint • access to application’s loggers • Update logger
configuration at runtime
Thread Dump Endpoint • provides a thread dump from the
application’s JVM • Accepts Text/plain requests • compatible with • https://fastthread.io • https://github.com/irockel/tda
Demo Actuator endpoints
Getting productive with Spring Boot Yay @madhurabhave23
[email protected]