spring boot
DESCRIPTION
This presentTRANSCRIPT
![Page 1: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/1.jpg)
Spring Boot
Eberhard Wolff Freelancer / Trainer
Head Technology Advisory Board adesso http://ewolff.com
![Page 2: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/2.jpg)
Eberhard Wolff - @ewolff
What does it take to implement a
Java Web Application?
![Page 3: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/3.jpg)
Eberhard Wolff - @ewolff
Any non-Java guys in the room?
![Page 4: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/4.jpg)
Eberhard Wolff - @ewolff
Java
AppServer
Libraries
Build
WAR
#SRSLY?
![Page 5: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/5.jpg)
Enter Spring Boot
![Page 6: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/6.jpg)
Spring Boot Demo
![Page 7: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/7.jpg)
Eberhard Wolff - @ewolff
Spring Boot• Build much easier • Supports Gradle & Ant, too • Not limited to simple application • Can add any other library
• Application much easier to test, debug etc
• Simple code
![Page 8: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/8.jpg)
Let‘s add Spring Data
JPA!
![Page 9: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/9.jpg)
Eberhard Wolff - @ewolff
Spring Data JPA• Makes implementation of
repositories trivial
• Just provide an interface
• Needs JPA infrastructure of course
![Page 10: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/10.jpg)
Spring Boot + Spring Data JPA Demo
![Page 11: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/11.jpg)
Eberhard Wolff - @ewolff
Behind the Scenes• DataSource for HSQL created • JPA infrastructure created • Thymeleaf infrastructure created • Can also use JSP, Velocity,
Freemarker, Groovy templates • How does it work? • Convention over configuration
![Page 12: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/12.jpg)
Eberhard Wolff - @ewolff
Spring Boot• Creates sensible infrastructure
defaults • i.e. DataSource if HSQL is on the
classpath • Done by *AutoConfiguration classes
![Page 13: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/13.jpg)
Auto Configuration
Demo
![Page 14: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/14.jpg)
Eberhard Wolff - @ewolff
Spring Boot Starter• Support for specific frameworks
amqp
aop
batch
data-jpa data-mongodb data-rest
integration
jdbc mobile
redis
security test web websocket
actuator remote-shell
jetty tomcat
log4j logback
web services
social
elasticsearch Solr
Flyway Liquibase Gemfire
![Page 15: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/15.jpg)
Spring Boot for Dev
![Page 16: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/16.jpg)
Eberhard Wolff - @ewolff
Dev• Turn Around
• Thymeleaf Templates can be changed on the fly
• …same with class files • Spring Loaded makes reloading
more powerful
![Page 17: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/17.jpg)
Spring Bootfor DevDemo
![Page 18: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/18.jpg)
Spring Boot for Ops
![Page 19: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/19.jpg)
Eberhard Wolff - @ewolff
CRaSH Shell• Ever ssh’d into your application? • Enter CRaSH • External library integrated into
Spring Boot • Alternative approach to operations
![Page 20: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/20.jpg)
Spring BootCRaSH Demo
![Page 21: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/21.jpg)
Eberhard Wolff - @ewolff
Actuator• Provide information about the
application • Via http / JSON • Can be evaluated by monitoring
tools etc. • Another alternative approach to
monitoring
![Page 22: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/22.jpg)
Spring BootActuator
Demo
![Page 23: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/23.jpg)
Eberhard Wolff - @ewolff
Deploy• Just package everything in an
executable JAR • …or a WAR
• Based on Maven or Gradle
• Build in configuration (YAML, properties etc.)
![Page 24: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/24.jpg)
Spring BootDeploy Demo
![Page 25: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/25.jpg)
Eberhard Wolff - @ewolff
What‘s next? Spring Cloud• Technologies for Micro Services • E.g. Configuration • Resilience • Netflix stack • Cloud Bus • Cloud Security • Based on Spring Boot
![Page 26: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/26.jpg)
Eberhard Wolff - @ewolff
Spring Boot 1.2• Spring 4.1
• JTA
• JNDI for DataSources / JMS
• Stay tuned
![Page 27: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/27.jpg)
Eberhard Wolff - @ewolff
Conclusion• Easy to start • Can add libraries and features as
needed • Dev: Quick turn around • Ops: Integrated monitoring • Ops: Easy deployment
![Page 28: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/28.jpg)
Eberhard Wolff - @ewolff
Conclusion• Easy to start • Can add libraries and features as
needed • Dev: Quick turn around • Ops: Integrated monitoring • Ops: Easy deployment • Didn’t show Groovy support
![Page 29: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/29.jpg)
Eberhard Wolff - @ewolff
Linkshttp://start.spring.io/ http://projects.spring.io/spring-boot/ https://github.com/spring-projects/spring-boot https://github.com/ewolff/spring-boot-demos https://spring.io/guides/gs/spring-boot/ https://spring.io/guides/gs/actuator-service/ https://spring.io/guides/gs/spring-boot-cli-and-js/
![Page 30: Spring Boot](https://reader034.vdocuments.mx/reader034/viewer/2022042521/557d6063d8b42abf3d8b50ee/html5/thumbnails/30.jpg)
Eberhard Wolff - @ewolff
Thank You!!