SlideShare a Scribd company logo
SPRING BOOT
UNDER THE
HOOD
@NICOLAS_FRANKEL
ME, MYSELF AND I
@nicolas_frankel #springboot
2
 Developer/Software -
/Solution Architect
• Java
• As consultant
HYBRIS, AN SAP COMPANY
3
@nicolas_frankel #springboot
@nicolas_frankel #springboot
4
@nicolas_frankel #springboot
5
SPRING BOOT ACTUATOR
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
@nicolas_frankel #springboot
6
/HEALTH
{
"status" : "UP",
"diskSpace" : {
"status" : "UP",
"total" : 499055067136,
"free" : 254812135424,
"threshold" : 10485760
},
"db" : {
"status" : "UP",
"database" : "HSQL Database Engine",
"hello" : 1
}
}
@nicolas_frankel #springboot
7
SPRING BOOT
Works well until:
• It doesn’t anymore
• Or you want to change the
default behavior
@nicolas_frankel #springboot
8
THERE’S NO MAGIC INVOLVED
@nicolas_frankel #springboot
9
CONFIGURATION – POM.XML
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>
@nicolas_frankel #springboot
10
STARTERS DEPENDENCIES
@nicolas_frankel #springboot
11
SPRING-BOOT-AUTOCONFIGURE.JAR
@nicolas_frankel #springboot
12
SPRING.FACTORIES
@nicolas_frankel #springboot
13
@JPAREPOSITORIESAUTOCONFIGURATION
@Configuration
@ConditionalOnBean(DataSource.class)
@ConditionalOnClass(JpaRepository.class)
@ConditionalOnMissingBean({
JpaRepositoryFactoryBean.class,
JpaRepositoryConfigExtension.class })
@ConditionalOnProperty(
prefix = "spring.data.jpa.repositories",
name = "enabled", havingValue = "true",
matchIfMissing = true)
@Import(JpaRepositoriesAutoConfigureRegistrar.class)
@AutoConfigureAfter(
HibernateJpaAutoConfiguration.class)
public class JpaRepositoriesAutoConfiguration {
}
@nicolas_frankel #springboot
14
@CONDITIONAL
@ConditionalOnBean
@ConditionalOnClass
@ConditionalOnMissingBean
@ConditionalOnProperty
etc.
@nicolas_frankel #springboot
15
REMEMBER @PROFILE?
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Profile {
String[] value();
}
@nicolas_frankel #springboot
16
THIS IS THE NEW @PROFILE
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,
ElementType.METHOD})
@Documented
@Conditional(ProfileCondition.class)
public @interface Profile {
String[] value();
}
@nicolas_frankel #springboot
17
@CONDITIONAL & CONDITION
@nicolas_frankel #springboot
18
@CONDITIONAL & CONDITION
Enables calling of a @Bean-
annotated method
• In the context of a
@Configuration class
@nicolas_frankel #springboot
19
ENOUGH TALK…
@nicolas_frankel #springboot
20
OUT-OF-THE-BOX CONDITIONS
Condition Description
OnBeanCondition Checks if a bean is in the Spring factory
OnClassCondition Checks if a class is on the classpath
OnExpressionCondition Evalutates a SPeL expression
OnJavaCondition Checks the version of Java
OnJndiCondition Checks if a JNDI branch exists
OnPropertyCondition Checks if a property exists
OnResourceCondition Checks if a resource exists
OnWebApplicationCondition Checks if a WebApplicationContext exists
@nicolas_frankel #springboot
21
COMPOSITE CONDITIONS
Condition Description
AllNestedConditions AND condition
AnyNestedConditions OR condition
NoneNestedCondition NOT condition
@nicolas_frankel #springboot
22
OUR OWN STARTER
@nicolas_frankel #springboot
23
Q&A
@nicolas_frankel #springboot
24
http://blog.frankel.ch/
@nicolas_frankel
http://frankel.in/
https://git.io/v2f3O

More Related Content

PPTX
Java Day Lviv - Spring Boot under the hood
Nicolas Fränkel
 
PDF
Dont Break Live lightning talk
Jamie Schmid
 
PDF
Automate everything with PowerShell
Jaap Brasser
 
PDF
Orgchart for Alfresco lightning talk
ITD Systems
 
PDF
Real Talk About Website Performance : 5 Must-Haves
Josh Koenig
 
PDF
Automating everything with Microsoft Flow
Jaap Brasser
 
PDF
DevOpsDays Baltimore March 2017 - Continuous Integration: A bittersweet love ...
Suzie Prince
 
Java Day Lviv - Spring Boot under the hood
Nicolas Fränkel
 
Dont Break Live lightning talk
Jamie Schmid
 
Automate everything with PowerShell
Jaap Brasser
 
Orgchart for Alfresco lightning talk
ITD Systems
 
Real Talk About Website Performance : 5 Must-Haves
Josh Koenig
 
Automating everything with Microsoft Flow
Jaap Brasser
 
DevOpsDays Baltimore March 2017 - Continuous Integration: A bittersweet love ...
Suzie Prince
 

Viewers also liked (15)

PDF
Lost art of troubleshooting
Leon Fayer
 
PDF
Asynchronous API in Java8, how to use CompletableFuture
José Paumard
 
PPTX
Spring boot
sdeeg
 
PDF
What is tackled in the Java EE Security API (Java EE 8)
Rudy De Busscher
 
PPTX
DevExperience - The Dark Side of Microservices
Nicolas Fränkel
 
PPTX
Data Science for Retail Broking
AlgoAnalytics Financial Consultancy Pvt. Ltd.
 
PDF
First appeal under RTI Act 2005 against Registrar (J-I) Supreme Court of Indi...
Om Prakash Poddar
 
PPTX
NET-A-PORTER AMP Hackathon
Robin Glen
 
PDF
Transformation structurelle et émergence au Sénégal - Madaniou DIEME
Madaniou DIEME
 
PPT
Environmental policy
mattbentley34
 
PDF
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
PDF
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
Amazon Web Services Japan
 
PDF
Upfront LP Survey of the Venture Capital & Startup Industry
Mark Suster
 
PDF
Spring Boot
Pei-Tang Huang
 
PDF
Microservices - java ee vs spring boot and spring cloud
Ben Wilcock
 
Lost art of troubleshooting
Leon Fayer
 
Asynchronous API in Java8, how to use CompletableFuture
José Paumard
 
Spring boot
sdeeg
 
What is tackled in the Java EE Security API (Java EE 8)
Rudy De Busscher
 
DevExperience - The Dark Side of Microservices
Nicolas Fränkel
 
Data Science for Retail Broking
AlgoAnalytics Financial Consultancy Pvt. Ltd.
 
First appeal under RTI Act 2005 against Registrar (J-I) Supreme Court of Indi...
Om Prakash Poddar
 
NET-A-PORTER AMP Hackathon
Robin Glen
 
Transformation structurelle et émergence au Sénégal - Madaniou DIEME
Madaniou DIEME
 
Environmental policy
mattbentley34
 
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
Amazon Web Services Japan
 
Upfront LP Survey of the Venture Capital & Startup Industry
Mark Suster
 
Spring Boot
Pei-Tang Huang
 
Microservices - java ee vs spring boot and spring cloud
Ben Wilcock
 
Ad

Similar to jDays - Spring Boot under the Hood (20)

PPTX
6.4 whats new
Splunk
 
PDF
JHipster overview and roadmap (August 2017)
Julien Dubois
 
PDF
SplunkLive! Hamburg / München Advanced Session
Georg Knon
 
PPTX
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
Nicolas Fränkel
 
PDF
Granting Oracle Schema Permissions when Objects not created Yet
Secure-24
 
PDF
Building Responsive Applications Using XPages
Teamstudio
 
PPTX
ING Meetup - Migrating Spring Boot Config Annotations to Functional with Kotlin
Nicolas Fränkel
 
PPTX
Kotlin/Everywhere Utrecht - From annotations to declarative, the path to more...
Nicolas Fränkel
 
PPTX
Kotlin/Everywehere Minsk - Migrating Spring Boot Apps from Annotation-based C...
Nicolas Fränkel
 
PPTX
W-JAX - Migrating Spring Boot apps from annotation-based config to Functional...
Nicolas Fränkel
 
PPTX
Istanbul Spring Meetup - Migrating SpringBoot Apps from Annotation-based Conf...
Nicolas Fränkel
 
PPTX
DevFest Santo Domingo - Migrating Spring Boot apps from annotation-based conf...
Nicolas Fränkel
 
PDF
Recent Developments With ZopeSkel
cbcunc
 
KEY
New Perspectives on Performance
mennovanslooten
 
PDF
Intro to DefectDojo at OWASP Switzerland
Matt Tesauro
 
PDF
SFBA Splunk Usergroup meeting March 13, 2024
Becky Burwell
 
PDF
Rapid Prototyping with Solr
Erik Hatcher
 
PPTX
Raspberry Pi, Azure and Office365 - How MoCaDeSyMo informs us about lunch
Thomas Gölles
 
PDF
Splunk 6.5.0-pivot tutorial (7)
Zoumana Diomande
 
PPTX
Splunk bangalore user group 2020 07-06
NiketNilay
 
6.4 whats new
Splunk
 
JHipster overview and roadmap (August 2017)
Julien Dubois
 
SplunkLive! Hamburg / München Advanced Session
Georg Knon
 
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
Nicolas Fränkel
 
Granting Oracle Schema Permissions when Objects not created Yet
Secure-24
 
Building Responsive Applications Using XPages
Teamstudio
 
ING Meetup - Migrating Spring Boot Config Annotations to Functional with Kotlin
Nicolas Fränkel
 
Kotlin/Everywhere Utrecht - From annotations to declarative, the path to more...
Nicolas Fränkel
 
Kotlin/Everywehere Minsk - Migrating Spring Boot Apps from Annotation-based C...
Nicolas Fränkel
 
W-JAX - Migrating Spring Boot apps from annotation-based config to Functional...
Nicolas Fränkel
 
Istanbul Spring Meetup - Migrating SpringBoot Apps from Annotation-based Conf...
Nicolas Fränkel
 
DevFest Santo Domingo - Migrating Spring Boot apps from annotation-based conf...
Nicolas Fränkel
 
Recent Developments With ZopeSkel
cbcunc
 
New Perspectives on Performance
mennovanslooten
 
Intro to DefectDojo at OWASP Switzerland
Matt Tesauro
 
SFBA Splunk Usergroup meeting March 13, 2024
Becky Burwell
 
Rapid Prototyping with Solr
Erik Hatcher
 
Raspberry Pi, Azure and Office365 - How MoCaDeSyMo informs us about lunch
Thomas Gölles
 
Splunk 6.5.0-pivot tutorial (7)
Zoumana Diomande
 
Splunk bangalore user group 2020 07-06
NiketNilay
 
Ad

More from Nicolas Fränkel (20)

PPTX
SnowCamp - Adding search to a legacy application
Nicolas Fränkel
 
PPTX
Un CV de dévelopeur toujours a jour
Nicolas Fränkel
 
PPTX
Zero-downtime deployment on Kubernetes with Hazelcast
Nicolas Fränkel
 
PDF
jLove - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
PPTX
BigData conference - Introduction to stream processing
Nicolas Fränkel
 
PPTX
ADDO - Your own Kubernetes controller, not only in Go
Nicolas Fränkel
 
PPTX
TestCon Europe - Mutation Testing to the Rescue of Your Tests
Nicolas Fränkel
 
PPTX
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
Nicolas Fränkel
 
PPTX
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
PPTX
JavaDay Istanbul - 3 improvements in your microservices architecture
Nicolas Fränkel
 
PPTX
OSCONF Hyderabad - Shorten all URLs!
Nicolas Fränkel
 
PPTX
Devclub.lv - Introduction to stream processing
Nicolas Fränkel
 
PPTX
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
Nicolas Fränkel
 
PPTX
JOnConf - A CDC use-case: designing an Evergreen Cache
Nicolas Fränkel
 
PPTX
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
Nicolas Fränkel
 
PPTX
JUG Tirana - Introduction to data streaming
Nicolas Fränkel
 
PPTX
Java.IL - Your own Kubernetes controller, not only in Go!
Nicolas Fränkel
 
PPTX
vJUG - Introduction to data streaming
Nicolas Fränkel
 
PPTX
London Java Community - An Experiment in Continuous Deployment of JVM applica...
Nicolas Fränkel
 
PPTX
OSCONF - Your own Kubernetes controller: not only in Go
Nicolas Fränkel
 
SnowCamp - Adding search to a legacy application
Nicolas Fränkel
 
Un CV de dévelopeur toujours a jour
Nicolas Fränkel
 
Zero-downtime deployment on Kubernetes with Hazelcast
Nicolas Fränkel
 
jLove - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
BigData conference - Introduction to stream processing
Nicolas Fränkel
 
ADDO - Your own Kubernetes controller, not only in Go
Nicolas Fränkel
 
TestCon Europe - Mutation Testing to the Rescue of Your Tests
Nicolas Fränkel
 
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
Nicolas Fränkel
 
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
Nicolas Fränkel
 
JavaDay Istanbul - 3 improvements in your microservices architecture
Nicolas Fränkel
 
OSCONF Hyderabad - Shorten all URLs!
Nicolas Fränkel
 
Devclub.lv - Introduction to stream processing
Nicolas Fränkel
 
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
Nicolas Fränkel
 
JOnConf - A CDC use-case: designing an Evergreen Cache
Nicolas Fränkel
 
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
Nicolas Fränkel
 
JUG Tirana - Introduction to data streaming
Nicolas Fränkel
 
Java.IL - Your own Kubernetes controller, not only in Go!
Nicolas Fränkel
 
vJUG - Introduction to data streaming
Nicolas Fränkel
 
London Java Community - An Experiment in Continuous Deployment of JVM applica...
Nicolas Fränkel
 
OSCONF - Your own Kubernetes controller: not only in Go
Nicolas Fränkel
 

Recently uploaded (20)

PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
DOCX
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PPTX
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
Presentation about variables and constant.pptx
kr2589474
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
Exploring AI Agents in Process Industries
amoreira6
 

jDays - Spring Boot under the Hood

Editor's Notes

  • #19: skinparam dpi 150 interface Conditional<T extends Condition><<(@,#A9DCDF)>> { value(): Class<T>[] } interface Condition { matches(context:ConditionContext, metadata:AnnotatedTypeMetadata):boolean } abstract class SpringBootCondition class ProfileCondition Conditional .down.> Condition SpringBootCondition .up.|> Condition ProfileCondition .up.|> Condition hide empty members hide empty attributes