Spring Boot 0
Spring Boot 0
Applcation.peoperties
create read
update delete
delete all
custom query UserRepository (interface)
BookController
continue
2) CREATE -> POST (@PostMapping)
application.properties pom.xml
getBookById update
deleteBook
addBook
• here in above we have given mapping in book and author so we can get author from book and book from author
• but when we getbook -> it will get author (but author has book) so author will getbook again book will getAuthor
• this will be infinite loop
• so to solve this problem @JsonManagedRefernce and @JsonBackReference is used
• @JsonManagedRefernce -> in parent (Book)
• @ JsonBackReference -> in child (Author) so it will manage that infinite loop
Thymleaf
controller
controller
controller
footer.html (fragment)
service.html
th.replace=”htmlName::fragmentName”
th.include=”htmlName::fragmentName”
• to send dynamic content we have send title , subtitle from controller to service.html ,
• service.html is sending this dynamic content as parameter to the footer.html
• footer.html will be printing all this dynamic content and returned to service.html and service.html will print all the footer.html with all content
Inheriting Thymeleaf Templare | This thing used in project |
controller
Base.html
about.html
about browser