SlideShare a Scribd company logo
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

More Related Content

PDF
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
PDF
Spring Boot
PPTX
Grails Spring Boot
PDF
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
PDF
Migrating 25K lines of Ant scripting to Gradle
PDF
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
PPTX
What is Spring Boot and Why Spring Boot ?
PDF
Spring boot
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Spring Boot
Grails Spring Boot
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
Migrating 25K lines of Ant scripting to Gradle
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
What is Spring Boot and Why Spring Boot ?
Spring boot

What's hot (20)

PPTX
Spring boot
PDF
Front End Development for Back End Developers - Devoxx UK 2017
PPTX
Spring boot
PDF
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
PDF
Ionic2
PDF
Bootiful Development with Spring Boot and Angular - RWX 2018
ODP
Springboot and camel
PDF
Using JHipster 4 for generating Angular/Spring Boot apps
PDF
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
PPTX
Spring boot
PDF
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
PDF
Spring Boot Intro
PPTX
Top 10 Spring Boot Interview Questions and Answers
PDF
Intro JavaScript
PDF
Intro to PhoneGap
PPTX
React native development with expo
PDF
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
PPTX
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
PDF
Spring IO '15 - Developing microservices, Spring Boot or Grails?
PDF
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Spring boot
Front End Development for Back End Developers - Devoxx UK 2017
Spring boot
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Ionic2
Bootiful Development with Spring Boot and Angular - RWX 2018
Springboot and camel
Using JHipster 4 for generating Angular/Spring Boot apps
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
Spring boot
Spring Boot Tutorial | Microservices Spring Boot | Microservices Architecture...
Spring Boot Intro
Top 10 Spring Boot Interview Questions and Answers
Intro JavaScript
Intro to PhoneGap
React native development with expo
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
Spring IO '15 - Developing microservices, Spring Boot or Grails?
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Ad

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

PDF
Building a Spring Boot Application - Ask the Audience!
PPTX
Spring boot
PDF
Spring Boot
PDF
Spring Boot Interview Questions PDF By ScholarHat
PPT
Springboot introduction
PPTX
Java and services code lab spring boot and spring data using mongo db
PPTX
Java and services code lab spring boot and spring data using mongo db
PDF
Rediscovering Spring with Spring Boot(1)
PDF
Introduction to Spring Boot
PDF
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
PDF
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
PPTX
Spring Boot and REST API
ODP
Xke spring boot
PPT
Spring Boot in Action
PPT
Spring Boot Introduction and framework.ppt
PDF
Spring boot jpa
PPTX
Spring boot Introduction
PPTX
PDF
Spring Boot Whirlwind Tour
PPTX
Java springboot framework- Spring Boot.pptx
Building a Spring Boot Application - Ask the Audience!
Spring boot
Spring Boot
Spring Boot Interview Questions PDF By ScholarHat
Springboot introduction
Java 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
Rediscovering Spring with Spring Boot(1)
Introduction to Spring Boot
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
Spring Boot and REST API
Xke spring boot
Spring Boot in Action
Spring Boot Introduction and framework.ppt
Spring boot jpa
Spring boot Introduction
Spring Boot Whirlwind Tour
Java springboot framework- Spring Boot.pptx
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
medical staffing services at VALiNTRY
PPTX
Transform Your Business with a Software ERP System
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Introduction to Artificial Intelligence
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Digital Strategies for Manufacturing Companies
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Nekopoi APK 2025 free lastest update
PTS Company Brochure 2025 (1).pdf.......
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Odoo Companies in India – Driving Business Transformation.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
medical staffing services at VALiNTRY
Transform Your Business with a Software ERP System
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Upgrade and Innovation Strategies for SAP ERP Customers
Introduction to Artificial Intelligence
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Digital Strategies for Manufacturing Companies
System and Network Administration Chapter 2
Design an Analysis of Algorithms II-SECS-1021-03
wealthsignaloriginal-com-DS-text-... (1).pdf
Design an Analysis of Algorithms I-SECS-1021-03
Adobe Illustrator 28.6 Crack My Vision of Vector Design

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