Introduction
Spring framework has been designed to easily integrate with ORM frameworks similar to Mybatis, Hibernate, and so on. Hibernate tutorials are very well documented and are available on the JBoss website. Hibernate gives us data persistence.
In this chapter we will see how we can integrate Spring Security with ORM frameworks. We will also integrate Spring Security with the latest MongoDB.
We will first do some basic setup with Hibernate and Spring. Since this chapter has database related stuff we need to create a database for all the recipes used in the chapter. I am using NetBeans IDE with maven. I feel NetBeans IDE is very advanced compared to others.
Setting up the Spring Hibernate application
We will create a simple horror movie application, which will display a list of horror movies with some CRUD (create, read, update, and delete) functions in the UI. The following steps are involved in setting up a Spring Hibernate application:
Create a
horrormoviedb
database in Derby. You can...