-
Hibernate/JPA Joined Table Inheritance Example
In this tutorial, we show how to map entity hierarchies onto database tables. There are several ways of mapping inheritance to the database. Here, we’ll look into Hibernate/JPA joined table inheritance.
Date: 2019-08-10 View: 1260
-
Hibernate/JPA Table Per Class Inheritance Example
In this tutorial, we show how to map entity hierarchies onto database tables. There are several ways of mapping inheritance to the database. Here, we’ll look into Hibernate/JPA table per class inheritance.
Date: 2019-08-10 View: 1076
-
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 XML configuration.
Date: 2019-08-10 View: 1588
-
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.
Date: 2019-08-10 View: 1117
-
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.
Date: 2019-08-10 View: 1335
-
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 driver will send the batched operation to the server in one call. This can potentially lead in a reduction to network bandwidth usage.
Date: 2019-08-10 View: 1122
-
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 both. The following is not a pure unit test and neither is it a pure integration test. ‘Cause it doesn’t use an identical copy of the production database. That a side, let’s look at the example.
Date: 2019-08-10 View: 1172
-
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 web application, make sure the com.h2database:h2 dependency resides on the classpath and we are using the org.springframework.boot:spring-boot-devtools. You can also manually configure the h2 web console. In the following tutorial we demonstrate how to configure the H2 Web Console using Spring Boot, Spring Data with Hibernate.
Date: 2019-08-10 View: 929
-
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 write some JUnit Integration Tests with spring-test, h2 in-memory database and MockMvc.
Date: 2019-08-10 View: 886
-
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 to validate if the email and/or password fields match.
Date: 2019-08-10 View: 918
-
Spring Security Forgot Password Send Email Reset Password
In this tutorial we demonstrate how to use Spring Security, Spring Boot, Hibernate and Thymeleaf to program a password reset flow by sending the user an email address to verify the reset password procedure. When a user has forgot his password, he is able to request a password reset. The application will generate a unique PasswordResetToken and store it in the database. The user’ll receive an email with the unique token. When he clicks the link, the user is redirected to a page where he can change his password.
Date: 2019-08-10 View: 1354
-
Java GZIP Example compress and decompress a file using Java
In this tutorial we demonstrate how to use GZIP to compress and decompress a file. Gzip is a file format and a software application used for file compression and decompression. GZIP is used to reduce the bytes of a file/text/stream. You’re able to compress a single file in GZIP format but you cannot compress and archive a directory like ZIP files using GZIP.
Date: 2019-08-10 View: 1460
-
Java 7z Seven Zip Example compress and decompress a file
In this tutorial we demonstrate how to compress files to 7z format recursively and decompress 7z files. 7-Zip also known as 7z is a compressed archive file format that supports several different data compression, encryption and pre-processing algorithms.
Date: 2019-08-10 View: 1878
-
Java TAR example compress and decompress *.tar or *.tar.gz files
This tutorial demonstrate how to compress files or directories recursively in .tar or .tar.gz format and how to decompress a .tar or .tar.gz file.
Date: 2019-08-10 View: 1258
-
Compress and Decompress Java JAR File with Apache Compress
In this tutorial we demonstrate how to compress and decompress Java JAR files using Apache Compress. In general, JAR archives are ZIP files, so the JAR package supports all options provided by the ZIP package.
Date: 2019-08-10 View: 1663