Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Full Stack Development with Spring Boot 2.0 and React

You're reading from  Hands-On Full Stack Development with Spring Boot 2.0 and React

Product type Book
Published in Jun 2018
Publisher Packt
ISBN-13 9781789138085
Pages 302 pages
Edition 1st Edition
Languages
Author (1):
Juha Hinkula Juha Hinkula
Profile icon Juha Hinkula

Table of Contents (24) Chapters

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. Setting Up the Environment and Tools – Backend 2. Using JPA to Create and Access a Database 3. Creating a RESTful Web Service with Spring Boot 4. Securing and Testing Your Backend 5. Setting Up the Environment and Tools – Frontend 6. Getting Started with React 7. Consuming the REST API with React 8. Useful Third-Party Components for React 9. Setting Up the Frontend for Our Spring Boot RESTful Web Service 10. Adding CRUD Functionalities 11. Styling the Frontend with React Material-UI 12. Testing Your Frontend 13. Securing Your Application 14. Deploying Your Application 15. Best Practices 1. Assessments 2. Other Books You May Enjoy Index

Chapter 3


Answer 1: REST is an architectural style for creating web services and it defines a set of constraints.

Answer 2: The easiest way to create RESTful web service with Spring Boot is to use Spring Data REST starter package. By default, the Spring Data REST finds all public repositories and creates automatically RESTful Web Services for your entities.

Answer 3: By sending a GET request to the endpoint of the entity. For example, if you have entity class called Car the Spring Data REST creates the endpoint called /cars that can be used to fetch all cars.

Answer 4: By sending a DELETE request to the endpoint of the individual entity item. For example, /cars/1 deletes an car with id 1.

Answer 5: By sending a POST request to the endpoint of the entity. The header must contain the Content-Type field with the value application/json and the new item will be embedded in the request body.

Answer 6: By sending a PATCH request to the endpoint of the entity. The header must contain the Content-Type field with the value application/json and the updated item will be embedded in the request body.

Answer 7: You have to annotate your repository using the @RepositoryRestResource annotation. The query parameters  are annotated using the @Param annotation.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}