Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vienna 2018)

Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vienna 2018)
Hanno?Hanno?Hanno?Hanno?Hanno?
IntroducingIntroducingIntroducingIntroducingIntroducing
Spring BootSpring BootSpring BootSpring BootSpring Boot
Spring Boot?Spring Boot?
( )
"Takes an opinionated view of building
production-ready Spring applications.
Favors convention over con guration and
is designed to get you up and running as
quickly as possible."
https://projects.spring.io/spring-boot
Key features?Key features?
create stand-alone Spring applications
embed web server directly (no WAR les)
automatic Spring con guration wherever
possible
no code generation and no XML con guration
still offering all Spring features.
Pros?Pros?
no separate web server needed
debug your application directly from your IDE
deployment by just copying your JAR le(s)
no web.xml or con guration classes needed
up and running with one Java le and a build
script.
( )https://www.ethode.com/blog/6-simple-reasons-why-spring-boot-rocks
Cons?Cons?
custom con guration will be a bit of a puzzle
porting your legacy Spring project would be a
disaster!
it uses Spring, excluding roughly half of the Java
community.
Starting OutStarting OutStarting OutStarting OutStarting Out
About What We ClaimedAbout What We Claimed
Earlier...Earlier...
"up and running with one Java le and a
build script"
Java le(s)Java le(s)
// imports...
@RestController
public class HelloController {
@RequestMapping("/")
public String index() {
return "Greetings from Spring Boot!";
}
}
// imports...
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Build scriptBuild script
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
jar {
// some properties...
}
// repositories...
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile("junit:junit")
}
Starter DependenciesStarter Dependencies
a set of convenient dependency
descriptors
Name Purpose
spring-boot-starter Core starter, includes auto-con g & logging
spring-boot-starter-test Test starter, includes JUnit, Hamcrest & Mockito
spring-boot-starter-web Starter for Spring MVC Web applications
spring-boot-starter-data-jpa Spring Data with JPA
spring-boot-starter-... ...
(more starters at
)
http://docs.spring.io/spring-
boot/docs/current/reference/htmlsingle/#using-boot-starter
Spring InitializrSpring Initializr
(a quick way to download a project setup)
http://start.spring.io/
Spring Boot 2Spring Boot 2Spring Boot 2Spring Boot 2Spring Boot 2
New Features - Spring Boot 2New Features - Spring Boot 2
More new features!More new features!
Animated GIF
banners
Kotlin support
(full release notes at
)
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-
Release-Notes
Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vienna 2018)
Kotlin supportKotlin support
Nullable information in Spring annotations
@RequestParam name: String? means not required
Bean classes can be open by default
for annotations @Component, @Async, @Transactional & @Cacheable
Kotlin-based Gradle build con guration
this means full auto-completion and validation in your IDE
(
)
https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5-
0
Pivotal Webinar TONIGHTPivotal Webinar TONIGHT
( )https://content.pivotal.io/webinars/mar-13-introducing-spring-boot-2-0-webinar
Live codingLive codingLive codingLive codingLive coding
Kahoot! #1
Kahoot! #2
Implementing RepositoryImplementing Repository
MethodsMethods
De ne them in a @Query annotation
Use one of the many supported query methods
(
)
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-
methods.query-creation
List<Entity> findByNameContainingIgnoreCase(String name);
Wrap-up &Wrap-up &Wrap-up &Wrap-up &Wrap-up &
QuestionsQuestionsQuestionsQuestionsQuestions
Wrap-upWrap-up
Spring Boot
gets you up & running quickly;
assumes standard con guration for rapid
development;
plays nice with a wide range of frameworks;
is up to the task no matter what choices you make.
And what if I preferAnd what if I prefer Java EEJava EE
Jakarta EE?Jakarta EE?
At least you can use embedded servers:
TomEE Embedded
( )
Wild y Swarm
( )
Quick assembly with JBoss ShrinkWrap
(
)
http://tomee.apache.org/advanced/tomee-embedded/index.html
http://wild y-swarm.io/
http://www.lordofthejars.com/2014/09/apache-tomee-shrinkwrap-javaee-boot-
not.html
Any questions?Any questions?Any questions?Any questions?Any questions?
@hannotify
Thank you! ☺Thank you! ☺
Just can't get enough?
https://hannotify.github.io
@hannotify
hanno.embregts@infosupport.com
1 of 28

Recommended

Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018) by
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)🎤 Hanno Embregts 🎸
279 views22 slides
Spring Boot by
Spring BootSpring Boot
Spring Bootkoppenolski
364 views15 slides
Grails Spring Boot by
Grails Spring BootGrails Spring Boot
Grails Spring BootTO THE NEW | Technology
930 views25 slides
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG by
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG🎤 Hanno Embregts 🎸
255 views68 slides
Migrating 25K lines of Ant scripting to Gradle by
Migrating 25K lines of Ant scripting to GradleMigrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to Gradle🎤 Hanno Embregts 🎸
672 views60 slides
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017) by
Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)🎤 Hanno Embregts 🎸
738 views22 slides

More Related Content

What's hot

Spring boot by
Spring bootSpring boot
Spring bootPradeep Shanmugam
641 views12 slides
Front End Development for Back End Developers - Devoxx UK 2017 by
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017Matt Raible
549 views102 slides
Spring boot by
Spring bootSpring boot
Spring bootShatrughna Singh
80 views11 slides
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017 by
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Matt Raible
771 views25 slides
Ionic2 by
Ionic2Ionic2
Ionic2Jiayun Zhou
3K views71 slides
Bootiful Development with Spring Boot and Angular - RWX 2018 by
Bootiful Development with Spring Boot and Angular - RWX 2018Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018Matt Raible
418 views58 slides

What's hot(20)

Front End Development for Back End Developers - Devoxx UK 2017 by Matt Raible
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
Matt Raible549 views
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017 by Matt Raible
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Matt Raible771 views
Bootiful Development with Spring Boot and Angular - RWX 2018 by Matt Raible
Bootiful Development with Spring Boot and Angular - RWX 2018Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018
Matt Raible418 views
Springboot and camel by Deepak Kumar
Springboot and camelSpringboot and camel
Springboot and camel
Deepak Kumar355 views
Using JHipster 4 for generating Angular/Spring Boot apps by Yakov Fain
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
Yakov Fain3.6K views
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017 by Matt Raible
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
Matt Raible346 views
Spring boot by sdeeg
Spring bootSpring boot
Spring boot
sdeeg26.6K views
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture... by Edureka!
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
Edureka!1.8K views
Top 10 Spring Boot Interview Questions and Answers by narendrachinnu
Top 10 Spring Boot Interview Questions and AnswersTop 10 Spring Boot Interview Questions and Answers
Top 10 Spring Boot Interview Questions and Answers
narendrachinnu61 views
Intro JavaScript by koppenolski
Intro JavaScriptIntro JavaScript
Intro JavaScript
koppenolski122 views
React native development with expo by SangSun Park
React native development with expoReact native development with expo
React native development with expo
SangSun Park1.3K views
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017 by Matt Raible
 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
Matt Raible947 views
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F... by Sébastien Levert
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
Spring IO '15 - Developing microservices, Spring Boot or Grails? by Fátima Casaú Pérez
Spring IO '15 - Developing microservices, Spring Boot or Grails?Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?
Microservices for the Masses with Spring Boot and JHipster - RWX 2018 by Matt Raible
Microservices for the Masses with Spring Boot and JHipster - RWX 2018Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Matt Raible396 views

Similar to Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vienna 2018)

Building a Spring Boot Application - Ask the Audience! by
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!🎤 Hanno Embregts 🎸
917 views21 slides
Spring Boot Whirlwind Tour by
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind TourVMware Tanzu
463 views19 slides
Spring boot jpa by
Spring boot jpaSpring boot jpa
Spring boot jpaHamid Ghorbani
915 views19 slides
Spring boot vs spring framework razor sharp web applications by
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 applicationsKaty Slemon
79 views32 slides
Spring Boot by
Spring BootSpring Boot
Spring BootJaran Flaath
543 views51 slides
Java and services code lab spring boot and spring data using mongo db by
Java and services code lab spring boot and spring data using mongo dbJava and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo dbStaples
228 views12 slides

Similar to Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vienna 2018)(20)

Spring Boot Whirlwind Tour by VMware Tanzu
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind Tour
VMware Tanzu463 views
Spring boot vs spring framework razor sharp web applications by Katy Slemon
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
Katy Slemon79 views
Java and services code lab spring boot and spring data using mongo db by Staples
Java and services code lab spring boot and spring data using mongo dbJava and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo db
Staples228 views
Java and services code lab spring boot and spring data using mongo db by Staples
Java and services code lab spring boot and spring data using mongo dbJava and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo db
Staples551 views
Angular elements - embed your angular components EVERYWHERE by Nadav Mary
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
Nadav Mary150 views
Modern UI Development With Node.js by Ryan Anklam
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.js
Ryan Anklam79.8K views
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions by Sébastien Levert
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
Spring Performance Gains by VMware Tanzu
Spring Performance GainsSpring Performance Gains
Spring Performance Gains
VMware Tanzu2.3K views
WebSocket on client & server using websocket-sharp & ASP.NET Core by Chen Yu Pao
WebSocket on client & server using websocket-sharp & ASP.NET CoreWebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET Core
Chen Yu Pao3K views
Front End Development for Backend Developers - GIDS 2019 by Matt Raible
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019
Matt Raible341 views
Front End Development for Back End Java Developers - NYJavaSIG 2019 by Matt Raible
Front End Development for Back End Java Developers - NYJavaSIG 2019Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019
Matt Raible731 views

More from 🎤 Hanno Embregts 🎸

Pattern Matching: Small Enhancement or Major Feature? by
Pattern Matching: Small Enhancement or Major Feature?Pattern Matching: Small Enhancement or Major Feature?
Pattern Matching: Small Enhancement or Major Feature?🎤 Hanno Embregts 🎸
23 views109 slides
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202 by
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202🎤 Hanno Embregts 🎸
4 views108 slides
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022 by
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022🎤 Hanno Embregts 🎸
7 views35 slides
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022 by
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022🎤 Hanno Embregts 🎸
5 views61 slides
Pattern Matching: Small Enhancement or Major Feature? by
Pattern Matching: Small Enhancement or Major Feature?Pattern Matching: Small Enhancement or Major Feature?
Pattern Matching: Small Enhancement or Major Feature?🎤 Hanno Embregts 🎸
75 views103 slides
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors" by
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"🎤 Hanno Embregts 🎸
62 views62 slides

More from 🎤 Hanno Embregts 🎸(15)

Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202 by 🎤 Hanno Embregts 🎸
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022 by 🎤 Hanno Embregts 🎸
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022 by 🎤 Hanno Embregts 🎸
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors" by 🎤 Hanno Embregts 🎸
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"
Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021) by 🎤 Hanno Embregts 🎸
Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021)Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021)
Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021)
Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand... by 🎤 Hanno Embregts 🎸
Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand...Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand...
Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand...
Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B... by 🎤 Hanno Embregts 🎸
Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B...Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B...
Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B...
QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018 by 🎤 Hanno Embregts 🎸
QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018
QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018

Recently uploaded

Elevate your SAP landscape's efficiency and performance with HCL Workload Aut... by
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...HCLSoftware
6 views2 slides
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... by
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...Deltares
6 views15 slides
Citi TechTalk Session 2: Kafka Deep Dive by
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Diveconfluent
17 views60 slides
Software testing company in India.pptx by
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptxSakshiPatel82
7 views9 slides
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... by
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...Deltares
9 views34 slides
Copilot Prompting Toolkit_All Resources.pdf by
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdfRiccardo Zamana
6 views4 slides

Recently uploaded(20)

Elevate your SAP landscape's efficiency and performance with HCL Workload Aut... by HCLSoftware
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
HCLSoftware6 views
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... by Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
Citi TechTalk Session 2: Kafka Deep Dive by confluent
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
confluent17 views
Software testing company in India.pptx by SakshiPatel82
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptx
SakshiPatel827 views
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... by Deltares
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
Deltares9 views
Copilot Prompting Toolkit_All Resources.pdf by Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana6 views
What Can Employee Monitoring Software Do?​ by wAnywhere
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​
wAnywhere21 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri711 views
Consulting for Data Monetization Maximizing the Profit Potential of Your Data... by Flexsin
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Flexsin 15 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
Neo4j y GenAI by Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j42 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
Roadmap y Novedades de producto by Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j50 views
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... by Deltares
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
Deltares13 views
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea... by Safe Software
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Safe Software412 views

Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vienna 2018)

  • 4. Spring Boot?Spring Boot? ( ) "Takes an opinionated view of building production-ready Spring applications. Favors convention over con guration and is designed to get you up and running as quickly as possible." https://projects.spring.io/spring-boot
  • 5. Key features?Key features? create stand-alone Spring applications embed web server directly (no WAR les) automatic Spring con guration wherever possible no code generation and no XML con guration still offering all Spring features.
  • 6. Pros?Pros? no separate web server needed debug your application directly from your IDE deployment by just copying your JAR le(s) no web.xml or con guration classes needed up and running with one Java le and a build script. ( )https://www.ethode.com/blog/6-simple-reasons-why-spring-boot-rocks
  • 7. Cons?Cons? custom con guration will be a bit of a puzzle porting your legacy Spring project would be a disaster! it uses Spring, excluding roughly half of the Java community.
  • 8. Starting OutStarting OutStarting OutStarting OutStarting Out
  • 9. About What We ClaimedAbout What We Claimed Earlier...Earlier... "up and running with one Java le and a build script"
  • 10. Java le(s)Java le(s) // imports... @RestController public class HelloController { @RequestMapping("/") public String index() { return "Greetings from Spring Boot!"; } } // imports... @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
  • 11. Build scriptBuild script apply plugin: 'java' apply plugin: 'idea' apply plugin: 'org.springframework.boot' jar { // some properties... } // repositories... dependencies { compile("org.springframework.boot:spring-boot-starter-web") testCompile("junit:junit") }
  • 12. Starter DependenciesStarter Dependencies a set of convenient dependency descriptors Name Purpose spring-boot-starter Core starter, includes auto-con g & logging spring-boot-starter-test Test starter, includes JUnit, Hamcrest & Mockito spring-boot-starter-web Starter for Spring MVC Web applications spring-boot-starter-data-jpa Spring Data with JPA spring-boot-starter-... ... (more starters at ) http://docs.spring.io/spring- boot/docs/current/reference/htmlsingle/#using-boot-starter
  • 13. Spring InitializrSpring Initializr (a quick way to download a project setup) http://start.spring.io/
  • 14. Spring Boot 2Spring Boot 2Spring Boot 2Spring Boot 2Spring Boot 2
  • 15. New Features - Spring Boot 2New Features - Spring Boot 2
  • 16. More new features!More new features! Animated GIF banners Kotlin support (full release notes at ) https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0- Release-Notes
  • 18. Kotlin supportKotlin support Nullable information in Spring annotations @RequestParam name: String? means not required Bean classes can be open by default for annotations @Component, @Async, @Transactional & @Cacheable Kotlin-based Gradle build con guration this means full auto-completion and validation in your IDE ( ) https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5- 0
  • 19. Pivotal Webinar TONIGHTPivotal Webinar TONIGHT ( )https://content.pivotal.io/webinars/mar-13-introducing-spring-boot-2-0-webinar
  • 20. Live codingLive codingLive codingLive codingLive coding
  • 23. Implementing RepositoryImplementing Repository MethodsMethods De ne them in a @Query annotation Use one of the many supported query methods ( ) https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query- methods.query-creation List<Entity> findByNameContainingIgnoreCase(String name);
  • 24. Wrap-up &Wrap-up &Wrap-up &Wrap-up &Wrap-up & QuestionsQuestionsQuestionsQuestionsQuestions
  • 25. Wrap-upWrap-up Spring Boot gets you up & running quickly; assumes standard con guration for rapid development; plays nice with a wide range of frameworks; is up to the task no matter what choices you make.
  • 26. And what if I preferAnd what if I prefer Java EEJava EE Jakarta EE?Jakarta EE? At least you can use embedded servers: TomEE Embedded ( ) Wild y Swarm ( ) Quick assembly with JBoss ShrinkWrap ( ) http://tomee.apache.org/advanced/tomee-embedded/index.html http://wild y-swarm.io/ http://www.lordofthejars.com/2014/09/apache-tomee-shrinkwrap-javaee-boot- not.html
  • 27. Any questions?Any questions?Any questions?Any questions?Any questions?
  • 28. @hannotify Thank you! ☺Thank you! ☺ Just can't get enough? https://hannotify.github.io @hannotify hanno.embregts@infosupport.com