cadec-2016-spring-boot-for-understanding-the-core-concepts.pptx

imjdabhinawpandey 10 views 22 slides Jul 09, 2024
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

this is the best ppt of spring boot


Slide Content

SPRING BOOT ASR PANDEY 2024-01-27 |

AGENDA Simple example What is Spring Boot? Demo application Jar fi les Developer Tools Con fi guration from con fi g server Actuator Wrap up 2

INTRODUCING SPRING BOOT Simple example REST service Spring Boot CLI (Command Line Interface) Groovy fi les

ing yyy con fi g props Spring xxx con fi g rops p Spr SPRING BOOT EMERGING 4 Spring Boot! props Spring Security con fi g props pom.xml + con fi g Spring Data con fi g props Spring Web con fi g props props pom.xml

WHAT IS SPRING BOOT Helps creating Spring Applications Convention over con fi guration Starter POMS Automatic con fi guration with sensible defaults Example: spring-boot-starter-web Features Monitoring Metrics - … 5

WHY – WHEN ” Getting started” the easy way quickly Check out new features in the Spring stack Minimal immediate knowledge of dependencies, con fi guration, … Need to create small autonomous applications (microservices) Distributed system landscape <number>

DEMO APPLICATION Rolling two dices REST endpoint /roll WEB page URL /rolling Eclipse STS (Spring Tool Suite) IntelliJ Idea <number>

JAR FILES demo-0.0.1-SNAPSHOT.jar big über-jar MANIFEST.MF Main-Class: org.springframework.boot.loader.JarLauncher <number>

EXECUTABLE JAR ” Script fi le” pom.xml … <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <executable>true</executable> </configuration> … <number>

MAIN APPLICATION CLASS @SpringBootApplication public class DicesServiceApplication { public static void main(String[] args){ SpringApplication.run(DicesServiceApplication.class, args); } } <number>

@SPRINGBOOTAPPLICATION @Con fi guration @ComponentScan @EnableAutoCon fi guration <number>

POM.XML Parent version 1.3.2.RELEASE Dependencies org.springframework.boot » spring-boot-starter-web » spring-boot-starter-thymeleaf » spring-boot-starter-test <number>

SPRING-BOOT-STARTER-WEB Dependencies org.springframework.boot » spring-boot-starter » spring-boot-starter- tomcat » spring-boot-starter-validation com.fasterxml.jackson.core » jackson-databind org.springframework » spring-web » spring- webmvc <number>

TURN ON DEPENDENCIES Dependencies to turn on DevTools Con fi g Actuator <number>

DEVELOPER TOOLS Automatic restart Code changes require restart of application LiveReload html, javascript, templates, images, stylesheets, … <number>

Con fi guration server - Holds con fi gurations for di ff erent applications CONFIGURATION FROM EXTERNAL APPLICATION dices-service con fi g-server <number>

ACTUATOR REST Endpoints /beans /autocon fi g /env /mappings - … /health /metrics - ... <number>

ACTUATOR – ADD METRICS Count dice rolls outcome CounterService Increment Decrement Reset <number>

WRAP UP Start using Spring Boot today for you Spring Applications! Reduce con fi guration ”noise” dramatically Th ink about what you don’t need to write! Enter the microservice arena the ”easy” way <number>

LINKS Spring Boot - http://projects.spring.io/spring-boot Initializr - http://start.spring.io GitHub - https://github.com/spring-projects/spring-boot https://github.com/spring-projects/spring-boot/tree/master/spring-boot-starters Callista blogs http://callistaenterprise.se/blogg/teknik/2014/04/15/a- fi rst-look-at-spring-boot/ http://callistaenterprise.se/blogg/teknik/2015/10/09/spring-boot-app-as-a- windows-service/ <number>

? <number>

QUIZ !! <number> PETERS PRESENTATION
Tags