Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Spring boot - Getting Started

702 views

Published on

Slides from a beginners Hackathon at the Technical University in Kosice.

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Spring boot - Getting Started

  1. 1. Spring Boot(camp) Getting started for the real world
  2. 2. <david.schmitz@senacor.com> Spring-Boot in a Nutshell
  3. 3. <david.schmitz@senacor.com> Demo - Hello World REST
  4. 4. <david.schmitz@senacor.com> Demo - Main Concepts Repository Entity Controller Application The thing that exposes Resources The thing that handles Database access The Resource The beginning of everything
  5. 5. <david.schmitz@senacor.com> Demo - Hello World REST Application
  6. 6. <david.schmitz@senacor.com> Demo - Hello World REST Entity Database
  7. 7. <david.schmitz@senacor.com> Demo - Hello World REST Repository Entity Controller Database
  8. 8. <david.schmitz@senacor.com> Demo - Hello World REST Controller $ curl http://localhost:8080/helloworld/ Repository
  9. 9. <david.schmitz@senacor.com> Demo - Hello World REST Controller $ curl http://localhost:8080/helloworld/ [{"id":"1","greeting":"Kosice="}, {"id":"2","greeting":"Bonn="}, {"id":"3","greeting":"Duesseldorf="}]
  10. 10. <david.schmitz@senacor.com> Demo - Hello World REST Controller $ curl http://localhost:8080/helloworld/1 {"id":"1","greeting":"Kosice="}
  11. 11. <david.schmitz@senacor.com> Demo - Hello World REST curl -X POST -d 'Kosice' http://localhost:8080/helloworld/ HTTP/1.1 201 Created {"greeting":"Kosice"} Controller
  12. 12. <david.schmitz@senacor.com> Your Turn!
  13. 13. <david.schmitz@senacor.com> Building Boot-Todo I want to create a new Todolist I want to add a new Todoitem to a Todolist Todolist Public Id Name Todoitem Public Id Description Done? Due Date I want to finish a Todoitem I want to remove Todoitems from a Todollist
  14. 14. <david.schmitz@senacor.com> Building Boot-Todo • Fetch Spring-Boot dependencies • Create Todoitem and Todolist as Resources • Create RestController and Repository for Todoitem Resource • Create RestController and Repository for Todolist Resource • Test it!
  15. 15. <david.schmitz@senacor.com> THANK YOU! <david.schmitz@senacor.com>

×