Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Spring Boot
Eberhard Wolff
Freelancer / Trainer
http://ewolff.com
Eberhard Wolff - @ewolff
What does it take
to implement a
Java Web
Application?
Eberhard Wolff - @ewolff
Any non-Java
guys in the room?
Eberhard Wolff - @ewolff
Java
AppServer
Libraries
Build
WAR
Eberhard Wolff - @ewolff
Java
AppServer
Libraries
Build
WAR
#SRSLY?
Enter Spring
Boot
Spring Boot
Demo
Eberhard Wolff - @ewolff
Spring Boot
•  Build much easier
•  Supports Gradle & Ant, too
•  Not limited to simple applicati...
Let‘s add
Spring Data
JPA!
Eberhard Wolff - @ewolff
Spring Data JPA
•  Makes implementation of
repositories trivial
•  Just provide an interface
•  N...
Spring Boot +
Spring Data
JPA Demo
Eberhard Wolff - @ewolff
Behind the Scenes
•  DataSource for HSQL created
•  JPA infrastructure created
•  Thymeleaf infra...
Eberhard Wolff - @ewolff
Spring Boot
•  Creates sensible infrastructure
defaults
•  i.e. DataSource if HSQL is on the
clas...
Auto
Configuration

Demo
Eberhard Wolff - @ewolff
Spring Boot Starter
•  Support for specific frameworks
amqp
aop
batch
data-jpa
data-mongodb data-...
Spring Boot
for Dev
Eberhard Wolff - @ewolff
Dev
•  Turn Around
•  Thymeleaf Templates can be
changed on the fly
•  …same with class files
•  ...
Spring Boot

for Dev

Demo
Spring Boot
for Ops
Eberhard Wolff - @ewolff
CRaSH Shell
•  Ever ssh’d into your application?
•  Enter CRaSH
•  External library integrated in...
Spring Boot

CRaSH Demo
Eberhard Wolff - @ewolff
Actuator
•  Provide information about the
application
•  Via http / JSON
•  Can be evaluated by m...
Spring Boot

Actuator
Demo
Eberhard Wolff - @ewolff
Deploy
•  Just package everything in an
executable JAR
•  …or a WAR
•  Based on Maven or Gradle
•...
Spring Boot

Deploy Demo
Eberhard Wolff - @ewolff
Conclusion
•  Easy to start
•  Can add libraries and features as
needed
•  Dev: Quick turn around...
Eberhard Wolff - @ewolff
Links
http://start.spring.io/
http://projects.spring.io/spring-boot/
https://github.com/spring-pr...
Eberhard Wolff - @ewolff
Thank You!!
Nächste SlideShare
Wird geladen in …5
×

Spring Boot

475 Aufrufe

Veröffentlicht am

Vortrag auf dem Expertenkreis Java, 14.8.2014, GEDOPLAN Bielefeld, Eberhard Wolff

Veröffentlicht in: Software
  • Als Erste(r) kommentieren

Spring Boot

  1. 1. Spring Boot Eberhard Wolff Freelancer / Trainer http://ewolff.com
  2. 2. Eberhard Wolff - @ewolff What does it take to implement a Java Web Application?
  3. 3. Eberhard Wolff - @ewolff Any non-Java guys in the room?
  4. 4. Eberhard Wolff - @ewolff Java AppServer Libraries Build WAR
  5. 5. Eberhard Wolff - @ewolff Java AppServer Libraries Build WAR #SRSLY?
  6. 6. Enter Spring Boot
  7. 7. Spring Boot Demo
  8. 8. 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
  9. 9. Let‘s add Spring Data JPA!
  10. 10. Eberhard Wolff - @ewolff Spring Data JPA •  Makes implementation of repositories trivial •  Just provide an interface •  Needs JPA infrastructure of course
  11. 11. Spring Boot + Spring Data JPA Demo
  12. 12. 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
  13. 13. Eberhard Wolff - @ewolff Spring Boot •  Creates sensible infrastructure defaults •  i.e. DataSource if HSQL is on the classpath •  Done by *AutoConfiguration classes
  14. 14. Auto Configuration
 Demo
  15. 15. 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
  16. 16. Spring Boot for Dev
  17. 17. Eberhard Wolff - @ewolff Dev •  Turn Around •  Thymeleaf Templates can be changed on the fly •  …same with class files •  Spring Loaded makes reloading more powerful
  18. 18. Spring Boot
 for Dev
 Demo
  19. 19. Spring Boot for Ops
  20. 20. Eberhard Wolff - @ewolff CRaSH Shell •  Ever ssh’d into your application? •  Enter CRaSH •  External library integrated into Spring Boot •  Alternative approach to operations
  21. 21. Spring Boot
 CRaSH Demo
  22. 22. Eberhard Wolff - @ewolff Actuator •  Provide information about the application •  Via http / JSON •  Can be evaluated by monitoring tools etc. •  Another alternative approach to monitoring
  23. 23. Spring Boot
 Actuator Demo
  24. 24. 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.)
  25. 25. Spring Boot
 Deploy Demo
  26. 26. 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
  27. 27. Eberhard Wolff - @ewolff Links http://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/
  28. 28. Eberhard Wolff - @ewolff Thank You!!

×