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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Madhura Bhave
October 08, 2019
Technology
56
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How to get productive with Spring Boot
Madhura Bhave
October 08, 2019
More Decks by Madhura Bhave
See All by Madhura Bhave
Breaking the Magician's Code
mbhave
0
560
What's new in Spring boot 2.0 - Spring IO
mbhave
4
2.4k
A Sneak Peek into Spring Boot 2.0
mbhave
3
1.6k
Other Decks in Technology
See All in Technology
個人OSSが、机の上から世界に広がるまでの話
shinyasaita
1
380
第3回しろおびセキュリティスポンサーセッション
log0417
0
160
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
290
強化学習「理論」入門
enakai00
3
3.6k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
関東Kaggler会発表資料
takoi
1
210
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
240
Model Studio CLI × Token Plan
maigo999
0
130
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
370
Pavlokで始める電撃駆動開発
sgrsn
0
190
JavaScript 研修 (2026)
recruitengineers
PRO
2
500
Digitization部 紹介資料
sansan33
PRO
2
7.7k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
A designer walks into a library…
pauljervisheath
211
24k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
450
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
260
YesSQL, Process and Tooling at Scale
rocio
174
15k
WCS-LA-2024
lcolladotor
0
790
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
480
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
430
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Six Lessons from altMBA
skipperchong
29
4.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]