Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Introduction to Spring Boot 2 and Spring Framework 5
Rating: 4.4 out of 5(1,530 ratings)
38,414 students

Introduction to Spring Boot 2 and Spring Framework 5

Build a Spring Boot Web Application
Last updated 2/2020
English
English

What you'll learn

  • Learn How to Create A Spring Boot Web Application
  • Create a new Spring Boot Project
  • Store and Retrieve Data with Spring Data JPA
  • Use Thymeleaf to Display Data from a Database to a Web Page

Course content

1 section15 lectures2h 17m total length
  • Introduction3:14

    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.

  • Setting up your Development Environment8:14

    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.

  • Spring Initializer15:25

    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 Project in IntelliJ8:52

    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.

  • Assignment - Create New Spring Boot Project
  • GitHub Workflow12:20

    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.

  • JPA Entities13:01

    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.

  • Equality in Hibernate5:07

    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.

  • Spring Data Repositories4:56

    Explore Spring Data repositories with Spring Data JPA and Hibernate, focusing on creating author and book repositories using CrudRepository and letting Spring provide implementations.

  • Initializing Data with Spring8:31

    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.

  • Add Publisher Entity
  • Publisher Relationships8:35

    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.

  • H2 Database Console5:09

    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.

  • Introduction to Spring MVC5:11

    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.

  • Configuring Spring MVC Controllers6:14

    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.

  • Thymeleaf Templates11:10

    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.

  • Display List of Authors
  • Conclusion0:32

    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.

Requirements

  • Basic Java knowledge is required

Description

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!

Who this course is for:

  • Java Developers
  • Anyone wishing to get started with Spring!