Spring with Hibernate

Treehouse
Course Summary
Using Hibernate to manage relational data in a Spring web application is not only an extremely powerful and scalable approach, but also widely used. In this course, we'll add a database to an animated GIF library, and discuss some more powerful features of Spring and Thymeleaf, such as HTML forms, file uploading, form validation, and flash messaging.
-
+
Course Description
About this Course Using Hibernate to manage relational data in a Spring web application is not only an extremely powerful and scalable approach, but also widely used. In this course, we'll add a database to an animated GIF library, and discuss some more powerful features of Spring and Thymeleaf, such as HTML forms, file uploading, form validation, and flash messaging. What you'll learn
- Spring
- Hibernate
- ORM
- Post-Redirect-Get
About the Teacher
On the side I run a nonprofit organization that takes teenagers to developing countries to volunteer during the summer. I enjoy running and yoga, especially outdoors in the beautiful Chicago summer weather.
-
+
Course Syllabus
Integrating Hibernate with Spring
As a first step toward using Hibernate in a Spring application, we first discuss how to configure a Spring app to include Hibernate for data management. We'll add the necessary dependencies and configuration code so that a Hibernate SessionFactory can be autowired into Spring components and used to fetch data from the database. 12 steps- Course Introduction 1:26
- What Changes in Spring 1:53
- Revisiting Giflib 4:55
- Spring Review 5 questions
- Configuring Giflib for Hibernate 3:03
- Create a SessionFactory and DataSource 17:34
- Configuring a DataSource and SessionFactory 1 question
- Add JPA Annotations to Entities 9:00
- JPA Annotations 1 question
- Add JPA Annotations to an Entity 2 objectives
- Fetching Data with Hibernate in Spring 6:17
- Configure Spring for Hibernate 3 objectives
Data-Driven Application Design
During this stage, we discuss the service-DAO software design pattern. By creating loosely-coupled components as separate layers in our applications, we can increase the maintainability, extensibility, reusability, and testability of our code. 9 stepsGetting Started with CRUD in Spring + Hibernate
With our service-DAO design pattern intact, it's time to tackle the various operations of Giflib. In this stage, we implement a post-redirect-get pattern in Spring and discuss the use of forms in Thymeleaf. 6 stepsUser Messages in Spring
In this stage we discuss the use of two kinds of messages to keep users informed: form validation messages and flash messages. For both of these we'll leverage Spring's RedirectAttributes in order for these messages to survive a redirect. 9 stepsFile Uploads and Entity Updates in Spring + Hibernate
In this final stage of the course, we discuss how to allow users the ability to upload files with HTML, as well as how to process those file uploads with Spring. In addition, we take the forms for adding categories and GIFs and make them reusable for updating each of those entities. 14 steps