
Explore building a functional web application with Spring Framework, Spring Boot 2, Spring MVC, and Spring Data JPA, generating HTML with dynamic content from an in-memory H2 database using Hibernate.
Set up a java development environment with JDK 8 or higher, Maven, and Gradle for Spring Framework development, then verify tools with java -version, javac, mvn -v, and Gradle -v.
Generate a Spring Framework web project in minutes with Spring Initializr, and explore how Spring Boot starters and Maven dependencies streamline setup to produce an executable jar.
Open a Spring Boot project in IntelliJ, review Spring Boot parent dependency management and starters web, data JPA, H2, and test, then use the Maven wrapper to run and test.
Demonstrate a practical GitHub workflow for the course by forking, cloning, and using branches to compare your work with the instructor’s repository while learning Maven projects.
Create JPA entities from two POJOs, author and book, using Hibernate. Map a many-to-many relationship with a join table and auto-generated ids.
Implement equals and hashCode based on the id to ensure Hibernate treats objects with the same id as equal. Add a custom toString to display object properties for debugging.
Explore Spring Data repositories with Spring Data JPA and Hibernate, focusing on creating author and book repositories using CrudRepository and letting Spring provide implementations.
Initialize sample data in a spring boot app by creating a bootstrap component that implements CommandLineRunner, injects repositories, and saves authors and books to an h2 database.
Map a publisher to many books using JPA relationships, with one-to-many and many-to-one annotations, joining on publisher_id. Hibernate auto-generates SQL and bootstraps data without manual SQL.
Enable and use the H2 database console in a Spring Boot app, connect to the in-memory jdbc:h2:mem:testDB, and inspect author, publisher, and book tables. Restart the app after setting spring.h2.console.enable=true.
Learn the Spring MVC pattern where the dispatcher servlet routes requests to a controller, fetches a POJO model via a service, and renders HTML or JSON with a templating engine.
Annotate the class as a Spring MVC controller, map /books with request mapping, inject a BookRepository, and add the book list to the model for the books view.
Learn Thymeleaf, a natural Java template engine, and set up the Spring Boot starter to render a books list using Thymeleaf iterators for id, title, and publisher name.
Concludes the section by reviewing the first web app built with the Spring Framework, revisiting the spring pet clinic projects, and previewing deeper topics in upcoming lectures.
This course a free introduction to Spring Boot 2 and Spring Framework 5.
Inside the course you will learn how easy it is to build a web application using Spring Boot 2.
You will learn how to create the initial Spring Boot project using the Spring Initializer.
Next is creating JPA Entities for persistence to a database using Hibernate.
Spring Boot will auto configure an in-memory H2 database, and you will see how to use Spring Boot with Spring Data JPA to initialize data into the database.
Finally, you are shown how to display data from the database on a web page with Spring MVC and Thymeleaf templates.
If you are new to Spring Boot, this is the perfect course to get you started!