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
テストを実行してSorbetのsigを書こう!
sansantech
PRO
1
100
「AIと一緒にやる」が当たり前になるまでの奮闘記
kakehashi
PRO
3
150
ZOZOTOWNの大規模マーケティングメール配信を支えるアーキテクチャ
zozotech
PRO
0
330
Serverless Meetup #21
yoshidashingo
1
120
Lambda management with ecspresso and Terraform
ijin
2
160
Rubyの国のPerlMonger
anatofuz
3
740
LLMをツールからプラットフォームへ〜Ai Workforceの戦略〜 #BetAIDay
layerx
PRO
1
980
JAWS AI/ML #30 AI コーディング IDE "Kiro" を触ってみよう
inariku
3
370
20250807_Kiroと私の反省会
riz3f7
0
230
金融サービスにおける高速な価値提供とAIの役割 #BetAIDay
layerx
PRO
1
830
風が吹けばWHOISが使えなくなる~なぜWHOIS・RDAPはサーバー証明書のメール認証に使えなくなったのか~
orangemorishita
15
5.8k
薬屋のひとりごとにみるトラブルシューティング
tomokusaba
0
330
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
450
Typedesign – Prime Four
hannesfritz
42
2.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Making Projects Easy
brettharned
117
6.3k
Navigating Team Friction
lara
188
15k
Building Applications with DynamoDB
mza
96
6.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
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]