Spring & Hibernate

Learn to build Enterprise java applications using Spring and Hibernate. Use Spring Boot throughout the course to achieve anything in backend server development!

15 topics

56 hours



spring boot code along screenshot

The course

In this course we learn the ropes for building Enterprise java application backends using the Spring framework. We start with learning to play with data using Hibernate and JPA. Dive more  into the world of ORM and interact with data without SQL! Along the way, learn to keep a close eye on fetch patterns in ORM.

Move to the Spring framework for building truly scalable and loosely coupled backend systems. We start with the Spring core basics and then move to Spring boot. Build dynamic server rendered web applications using Spring Web MVC. Bring on the same Hibernate ORM concepts in the Spring data JPA world. Learn to build RESTful web services using Spring web. Secure things using the Spring Security module. Learn to test your code using the various testing libraries that can be used in a Spring Boot project.


Pre requisites: Core Java (preferable Java 8), little bit of SQL and optimism!


The journey

  • What exactly is Object Relational Mapping (ORM)
  • Introducing the Java Persistence API (JPA)
  • Hibernate and its architecture

  • Hibernate configuration file
  • Hibernate Session factory and Session

  • Introducing JPA entities
  • JPA annotations
  • Relationship amongst JPA entities – One to one, one to many, many to one, many to many
  • Mapping to list, bag, set and map

  • Saving a JPA entity
  • Updating a JPA entity
  • Deleting a JPA entity
  • Saving, updating, deleting related JPA entities in Hibernate
  • Transactions – begin(), commit(), rollback()

  • Basic querying functions on the Hibernate session
  • Hibernate criteria query language
  • Hibernate query language (HQL)
  • Named queries

  • Table per hierarchy
  • Table per concrete class
  • Table per subclass

  • Performance considerations of ORM based solutions
  • Lazy loading vs Eager loading of related entities
  • First level cache
  • Second level cache

  • Layers of enterprise Java applications where Spring fits into
  • Overview of the various modules from the Spring framework

  • The Spring container
  • Inversion of control (IOC) / Dependency injection (DI)
  • Constructor injection
  • Field injection
  • Setter injection
  • Spring bean scopes
  • @Required, @PostConstruct, @PreDestroy, @Service, @Named core annotations

  • Why Spring Boot?
  • Spring Initializr to quickly scaffold up the application
  • Overview of the various Spring Boot starters
  • Spring Boot Parent starter
  • Spring Boot specific annotations to get started
  • Dependency management
  • Application properties file

  • Setting up a spring web mvc application using spring boot
  • Spring boot dev tools and its usage in development workflow. Setting up the IDE
  • Using Java Server Pages (JSP) as the view layer technology – Expression language (EL), Jakarta Standard Tag Library (JSTL), Implicit objects
  • Spring web annotations – @Controller, @RequestMapping, @RequestParam, @SessionAttributes
  • Redirection and flash attributes
  • Writing business logic in @Service and injecting it in @Controller

  • Data source configuration
  • Defining the JPA entities
  • Introducing the Spring data JpaRepository
  • Dynamic querying in jpa repositories – query method subject, predicate keywords and modifiers
  • EntityManager & defining custom repository functions using hibernate criteria api
  • Integrating JPA NamedQueries with Spring data jpa repository

  • What are web services?
  • Introduction to REST
  • JSON as the format of data exchange
  • @RestController annotation
  • Handle incoming request data
  • Handle path params and query params
  • Validating incoming request data

  • Introduction to the Spring Security module
  • Implementing Basic Auth
  • Using Spring security built in login page and creating own custom login page
  • Encrypting password
  • CSRF protection
  • Implementing OAuth

  • Unit testing spring services
  • Mockito for mocking collaborators
  • Testing controllers

The skills



Business functions



Web services



Unit testing


The projects

Project 1Library management

During the course code along, build a nice, almost functional library management system for managing books, authentication, issuing/returning books

Project 2Movie ticket booking

As part of the capstone project, build a movie ticket booking system backend using Spring & Hibernate

Contact us+91 98336 99504

Request more information