Category: Database
Spring Security User Registration with Hibernate and Thymeleaf
In this example we show how to create a user registration form with Spring Security, Hibernate and Thymeleaf. We validate the user registration fields with hibernate validator annotations and a custom field matching validator...
Spring Boot + Spring Security + Hibernate Configuration Example
This tutorial demonstrates how to configure Spring Security Hibernate and Spring Boot. We secure a simple stateless web service using basic authentication. We configure Spring Security using Spring Java and/or XML Configuration. Finally, we...
Spring Boot Couchbase Caching Example Configuration
Couchbase is a NoSQL database that can act as a spring framework cache provider on top of the spring framework cache abstraction layer. Caching improves the overal performance of an application. Say you have...
Spring Boot – Spring Data JPA with Hibernate and H2 Web Console
The H2 database provides a browser-based web console that Spring Boot can auto-configure for you. In order to let spring auto-configure the H2 Web Console, we have to make sure we are developing a...
Unit Test JPA with JUnit H2 In Memory Database
This tutorial shows how to Unit Test JPA with JUnit and a H2 In Memory Database. Some people disagree and don’t call these unit tests, but integration tests. Imho there is some truth in...
Hibernate/JPA Batch Insert and Batch Update Example
This tutorial shows how to create batch insert and batch update statements using JPA and Hibernate. JDBC offers support for batching together SQL statements that can be represented as a single PreparedStatement. The JDBC...
Hibernate/JPA Named Stored Procedure XML and Annotation Example
This tutorial show how to use Named Stored Procedures using JPA with either XML and Annotations. We show a concrete example how to use Named Stored Procedures. Maven Dependencies We use Apache Maven to...
Hibernate/JPA Named Native Query XML and Annotation Example
Previously, we saw how to use named queries. This tutorial, we show how to use Hibernate/JPA Named Native Queries. With Named Native Queries, we can use native SQL statements. Maven Dependencies We use Apache...
Hibernate/JPA Named Query XML and Annotation Example
This tutorial show how to use Hibernate/JPA Named Queries. We start by explaining why we would use named queries. Next, we show an example of how to use named queries, either with annotations or...