SlideShare a Scribd company logo
Spring Boot
Applications. Simply.
Jaran Flaath
• Senior consultant at Kodehuset
• 12 years of professional
software development
experience
• Frequent speaker
• Previous leader of javaBin
Sørlandet and VP of javaBin
• When not coding: Building
LEGO and driving R/C cars
• http://twitter.com/jaranflaath
What is Spring?
What is Spring?
Modular application framework assisting with almost
any aspect of modern application development
What is Spring Boot?
Spring Boot makes it easy to create stand-alone,
production-grade Spring based Applications that you
can "just run".
What is Spring Boot?
FEATURES
• Create stand-alone Spring applications
• Embed Tomcat, Jetty or Undertow directly (no need
to deploy WAR files)
• Provide opinionated 'starter' POMs to simplify your
Maven or Gradle configuration
• Automatically configure Spring whenever possible
• Provide production-ready features such as metrics,
health checks and externalised configuration
• No code generation or XML configuration
Maven and Gradle support
via starter-artifacts
• Provides a range of spring-boot-starter-* artifacts
that contains what you need to get up and running
fast
• Customise when you need!
Let’s BOOT an
application!
Versions
• Current stable: 1.3.5

• Very soon arriving: 1.4.0



We will be using 1.3.5 for the demo today, but have a
look at the new features in 1.4.0 towards the end.
Our goal
• Create a REST web service with Spring Boot,
Groovy and Gradle

• Use case: A simple R/C Car registry!
What we will cover
• Creating an application
• Executable JAR
• Custom banner (because they’re awesome)
• Application configuration (and auto-configuration)
• Repositories
• Creating REST endpoints
• Testing
• Security
• Actuators
Step 1: 

Create application and
run it
Step 1: Takeaways
• @SpringBootApplication-annotation:



A convenience annotation combining
@EnableAutoConfiguration, @Configuration
and @ComponentScan

• We start our application with
SpringApplication.run()
Step 2: 

Executable JAR
Step 2: Takeaways
• Add spring-boot-gradle-plugin (or spring-boot-
maven-plugin)
• Application JAR can then be run as an executable
If linked as a service from /etc/init.d you will be able
to run the application as a daemon and use start,
stop and status arguments
Step 3: 

Custom banner
Step 3: Takeaways
• Well… It is very cool!
Step 4: 

Application configuration
and repositories
Step 4: Takeaways
• Configuration provided with @Configuration
annotated class(es)
• Provide beans using @Bean annotated methods
• Easy data access with repositories

Configuration properties can be declared
using .properties or .yaml files both in- and outside
your application

http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-application-property-files
Step 5: 

Service endpoint
Step 5: Takeaways
• Add endpoints with @RestController and
@RequestMapping annotations
• No further configuration needed

Step 6: 

Testing
Step 6: Takeaways
• Easy testing of endpoints using RestTemplate
• Point your integration test to your application using
@SpringApplicationConfiguration(AppClass.class)
• Configure random testing port using
@WebIntegrationTest(randomPort = true) and
obtain the port using @Value('${local.server.port}')

Step 7: 

Security
Step 7: Takeaways
• Simply adding spring-security to class path enables
security
• @EnableWebSecurity disables default configuration
and allows us to customise security
• Extend WebSecurityConfigurerAdapter to
customise security

Step 8: 

Security 2
Step 8: Takeaways
• Use TestRestTemplate for additional functionality in
a test context

NOTE: Disabling CSRF should only be done for quick
testing and prototyping
Step 9: 

Actuators
Step 9: Takeaways
• Actuators are a set of endpoints exposing useful
information and controls for your application

Full list of Actuators: 

http://docs.spring.io/spring-boot/docs/
1.3.3.RELEASE/reference/htmlsingle/#production-
ready-endpoints
What’s new in 1.4.0?
Startup failure analysis
New test annotation
• @SpringBootTest with parameters is used instead
of @SpringApplicationConfiguration,
@IntegrationTest and @WebIntegrationTest
• @LocalServerPort for injecting the port of the web
server used during test
Upgraded dependencies
• Based on Spring 4.3
• Default JPA persistence provider is Hibernate 5, up
from 4.3
Image banners!
New annotation for mocking
existing beans
• @MockBean for mocking existing beans in your
application





• @SpyBean for spying existing beans
• See the rest here: 

https://github.com/spring-projects/spring-boot/wiki/
Spring-Boot-1.4-Release-Notes
That’s it. Simply.
Thank you!
twitter.com/jaranflaath jaran.flaath@gmail.com
Image CC BY-SA 4.0 Ashashyou (https://commons.wikimedia.org/wiki/User:Ashashyou)

More Related Content

What's hot

White paper mbre_en
White paper mbre_enWhite paper mbre_en
White paper mbre_en
VisioneerUG
 
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)
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
🎤 Hanno Embregts 🎸
 
Spring boot 3g
Spring boot 3gSpring boot 3g
Spring boot 3gvasya10
 
Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot! Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot!
GlobalLogic Ukraine
 
Spring Boot
Spring BootSpring Boot
Spring Boot
koppenolski
 
What is Spring Boot and Why Spring Boot ?
What is Spring Boot and Why Spring Boot ?What is Spring Boot and Why Spring Boot ?
What is Spring Boot and Why Spring Boot ?
narendrachinnu
 
Spring boot
Spring bootSpring boot
Spring boot
Pradeep Shanmugam
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
VMware Tanzu
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Spring boot
Spring bootSpring boot
Spring boot
Shatrughna Singh
 
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
Hamid Ghorbani
 
Spring Boot Intro
Spring Boot IntroSpring Boot Intro
Spring Boot Intro
Alberto Flores
 
Migrating 25K lines of Ant scripting to Gradle
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 🎸
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
koppenolski
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
Steven Smith
 
Advanced Spring Boot with Consul
Advanced Spring Boot with ConsulAdvanced Spring Boot with Consul
Advanced Spring Boot with Consul
VMware Tanzu
 
Selenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set UpSelenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set Up
ITProfessional Academy
 
Selenium Topic 2 IDE
Selenium Topic 2 IDESelenium Topic 2 IDE
Selenium Topic 2 IDE
ITProfessional Academy
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
Edureka!
 
Workshop Guide: RESTful Java Web Application with Spring Boot
Workshop Guide: RESTful Java Web Application with Spring BootWorkshop Guide: RESTful Java Web Application with Spring Boot
Workshop Guide: RESTful Java Web Application with Spring Boot
Fabricio Epaminondas
 

What's hot (20)

White paper mbre_en
White paper mbre_enWhite paper mbre_en
White paper mbre_en
 
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)
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
 
Spring boot 3g
Spring boot 3gSpring boot 3g
Spring boot 3g
 
Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot! Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot!
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
What is Spring Boot and Why Spring Boot ?
What is Spring Boot and Why Spring Boot ?What is Spring Boot and Why Spring Boot ?
What is Spring Boot and Why Spring Boot ?
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
 
Spring Boot Intro
Spring Boot IntroSpring Boot Intro
Spring Boot Intro
 
Migrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to GradleMigrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to Gradle
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
Advanced Spring Boot with Consul
Advanced Spring Boot with ConsulAdvanced Spring Boot with Consul
Advanced Spring Boot with Consul
 
Selenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set UpSelenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set Up
 
Selenium Topic 2 IDE
Selenium Topic 2 IDESelenium Topic 2 IDE
Selenium Topic 2 IDE
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
 
Workshop Guide: RESTful Java Web Application with Spring Boot
Workshop Guide: RESTful Java Web Application with Spring BootWorkshop Guide: RESTful Java Web Application with Spring Boot
Workshop Guide: RESTful Java Web Application with Spring Boot
 

Similar to SpringBoot

Module 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to beginModule 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to begin
Deepakprasad838637
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
Jeevesh Pandey
 
Calabash for iPhone apps
Calabash for iPhone appsCalabash for iPhone apps
Calabash for iPhone apps
Chathura palihakkara
 
Bootify your spring application
Bootify your spring applicationBootify your spring application
Bootify your spring application
Jimmy Lu
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Kalkey
 
Springboot - A milestone framework in Java Development
Springboot - A milestone framework in Java DevelopmentSpringboot - A milestone framework in Java Development
Springboot - A milestone framework in Java Development
Expeed Software
 
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 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
Staples
 
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 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
Staples
 
Maven
MavenMaven
Maven
Shraddha
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
Spring boot wednesday
Spring boot wednesdaySpring boot wednesday
Spring boot wednesday
Vinay Prajapati
 
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)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
🎤 Hanno Embregts 🎸
 
Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014
Clever Moe
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
Eric Overfield
 
Selenium web driver_2.0_presentation
Selenium web driver_2.0_presentationSelenium web driver_2.0_presentation
Selenium web driver_2.0_presentation
sayhi2sudarshan
 
Andreas Grabner - Performance as Code, Let's Make It a Standard
Andreas Grabner - Performance as Code, Let's Make It a StandardAndreas Grabner - Performance as Code, Let's Make It a Standard
Andreas Grabner - Performance as Code, Let's Make It a Standard
Neotys_Partner
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
michaelaaron25322
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkit
Michael Nelson
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
Prabhu Nehru
 

Similar to SpringBoot (20)

Module 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to beginModule 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to begin
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Calabash for iPhone apps
Calabash for iPhone appsCalabash for iPhone apps
Calabash for iPhone apps
 
Bootify your spring application
Bootify your spring applicationBootify your spring application
Bootify your spring application
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Springboot - A milestone framework in Java Development
Springboot - A milestone framework in Java DevelopmentSpringboot - A milestone framework in Java Development
Springboot - A milestone framework in Java Development
 
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 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
 
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 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
 
Maven
MavenMaven
Maven
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
Spring boot wednesday
Spring boot wednesdaySpring boot wednesday
Spring boot wednesday
 
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)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
 
Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
 
Selenium web driver_2.0_presentation
Selenium web driver_2.0_presentationSelenium web driver_2.0_presentation
Selenium web driver_2.0_presentation
 
Andreas Grabner - Performance as Code, Let's Make It a Standard
Andreas Grabner - Performance as Code, Let's Make It a StandardAndreas Grabner - Performance as Code, Let's Make It a Standard
Andreas Grabner - Performance as Code, Let's Make It a Standard
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkit
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 

More from Jaran Flaath

Intro to docker
Intro to dockerIntro to docker
Intro to docker
Jaran Flaath
 
Effective Testing
Effective TestingEffective Testing
Effective Testing
Jaran Flaath
 
JUnit 5 Alpha
JUnit 5 AlphaJUnit 5 Alpha
JUnit 5 Alpha
Jaran Flaath
 
MyGitBackup
MyGitBackupMyGitBackup
MyGitBackup
Jaran Flaath
 
Delivering Great Software
Delivering Great SoftwareDelivering Great Software
Delivering Great Software
Jaran Flaath
 
Spring Test DBUnit
Spring Test DBUnitSpring Test DBUnit
Spring Test DBUnit
Jaran Flaath
 
Trello
TrelloTrello
Trello
Jaran Flaath
 
Bootstrap lightning talk
Bootstrap lightning talkBootstrap lightning talk
Bootstrap lightning talk
Jaran Flaath
 
Apache Solr - search for everyone!
Apache Solr - search for everyone!Apache Solr - search for everyone!
Apache Solr - search for everyone!
Jaran Flaath
 

More from Jaran Flaath (9)

Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
Effective Testing
Effective TestingEffective Testing
Effective Testing
 
JUnit 5 Alpha
JUnit 5 AlphaJUnit 5 Alpha
JUnit 5 Alpha
 
MyGitBackup
MyGitBackupMyGitBackup
MyGitBackup
 
Delivering Great Software
Delivering Great SoftwareDelivering Great Software
Delivering Great Software
 
Spring Test DBUnit
Spring Test DBUnitSpring Test DBUnit
Spring Test DBUnit
 
Trello
TrelloTrello
Trello
 
Bootstrap lightning talk
Bootstrap lightning talkBootstrap lightning talk
Bootstrap lightning talk
 
Apache Solr - search for everyone!
Apache Solr - search for everyone!Apache Solr - search for everyone!
Apache Solr - search for everyone!
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 

SpringBoot

  • 2. Jaran Flaath • Senior consultant at Kodehuset • 12 years of professional software development experience • Frequent speaker • Previous leader of javaBin Sørlandet and VP of javaBin • When not coding: Building LEGO and driving R/C cars • http://twitter.com/jaranflaath
  • 3.
  • 4.
  • 6. What is Spring? Modular application framework assisting with almost any aspect of modern application development
  • 8. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". What is Spring Boot?
  • 10. • Create stand-alone Spring applications
  • 11. • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
  • 12. • Provide opinionated 'starter' POMs to simplify your Maven or Gradle configuration
  • 13. • Automatically configure Spring whenever possible
  • 14. • Provide production-ready features such as metrics, health checks and externalised configuration
  • 15. • No code generation or XML configuration
  • 16. Maven and Gradle support via starter-artifacts • Provides a range of spring-boot-starter-* artifacts that contains what you need to get up and running fast • Customise when you need!
  • 17.
  • 19. Versions • Current stable: 1.3.5
 • Very soon arriving: 1.4.0
 
 We will be using 1.3.5 for the demo today, but have a look at the new features in 1.4.0 towards the end.
  • 20. Our goal • Create a REST web service with Spring Boot, Groovy and Gradle
 • Use case: A simple R/C Car registry!
  • 21. What we will cover • Creating an application • Executable JAR • Custom banner (because they’re awesome) • Application configuration (and auto-configuration) • Repositories • Creating REST endpoints • Testing • Security • Actuators
  • 22. Step 1: 
 Create application and run it
  • 23. Step 1: Takeaways • @SpringBootApplication-annotation:
 
 A convenience annotation combining @EnableAutoConfiguration, @Configuration and @ComponentScan
 • We start our application with SpringApplication.run()
  • 25. Step 2: Takeaways • Add spring-boot-gradle-plugin (or spring-boot- maven-plugin) • Application JAR can then be run as an executable If linked as a service from /etc/init.d you will be able to run the application as a daemon and use start, stop and status arguments
  • 27. Step 3: Takeaways • Well… It is very cool!
  • 28. Step 4: 
 Application configuration and repositories
  • 29. Step 4: Takeaways • Configuration provided with @Configuration annotated class(es) • Provide beans using @Bean annotated methods • Easy data access with repositories
 Configuration properties can be declared using .properties or .yaml files both in- and outside your application
 http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-application-property-files
  • 31. Step 5: Takeaways • Add endpoints with @RestController and @RequestMapping annotations • No further configuration needed

  • 33. Step 6: Takeaways • Easy testing of endpoints using RestTemplate • Point your integration test to your application using @SpringApplicationConfiguration(AppClass.class) • Configure random testing port using @WebIntegrationTest(randomPort = true) and obtain the port using @Value('${local.server.port}')

  • 35. Step 7: Takeaways • Simply adding spring-security to class path enables security • @EnableWebSecurity disables default configuration and allows us to customise security • Extend WebSecurityConfigurerAdapter to customise security

  • 37. Step 8: Takeaways • Use TestRestTemplate for additional functionality in a test context
 NOTE: Disabling CSRF should only be done for quick testing and prototyping
  • 39. Step 9: Takeaways • Actuators are a set of endpoints exposing useful information and controls for your application
 Full list of Actuators: 
 http://docs.spring.io/spring-boot/docs/ 1.3.3.RELEASE/reference/htmlsingle/#production- ready-endpoints
  • 40. What’s new in 1.4.0?
  • 42. New test annotation • @SpringBootTest with parameters is used instead of @SpringApplicationConfiguration, @IntegrationTest and @WebIntegrationTest • @LocalServerPort for injecting the port of the web server used during test
  • 43. Upgraded dependencies • Based on Spring 4.3 • Default JPA persistence provider is Hibernate 5, up from 4.3
  • 45. New annotation for mocking existing beans • @MockBean for mocking existing beans in your application
 
 
 • @SpyBean for spying existing beans
  • 46. • See the rest here: 
 https://github.com/spring-projects/spring-boot/wiki/ Spring-Boot-1.4-Release-Notes
  • 47.
  • 49. Thank you! twitter.com/jaranflaath jaran.flaath@gmail.com Image CC BY-SA 4.0 Ashashyou (https://commons.wikimedia.org/wiki/User:Ashashyou)