Headstart Framework: Identity Access Management (IAM) Service

The general design of the Headstart Framework makes it flexible to implement an Identity Access Management (IAM) service. Then, we could use the service with both monolith or distributed applications.

Spring Boot Security Tests With PreAuth And WithMockUser

When we implement authorization in Spring Boot with Spring Security, for instance, using the PreAuth annotation, we should never skip automated tests for it. We could use the @PreAuth, among

Headstart Framework: Flyway and Supported Databases

We have designed the Headstart framework to be database-agnostic to support major database products with the help of Flyway. To achieve this database agnosticism, Headstart uses Spring Data/Hibernate but relies

The Number of Entities In a Hibernate Persistence Context

One of my worries with Hibernate was the number of entities accumulating in a Persistence Context. If I were not careful, my codes could potentially store thousands of entities in

How to use Hibernate JPA in a simple Application

This article demonstrates how to use Hibernate Entity Manager 4.3.7 in a simple application.

File Compression in Java with Apache Commons Compress

Apache Commons Compress can be downloaded from http://commons.apache.org/compress/

How To Use Java 8 Stream Reduce Example

This post shows how to use Java Stream Reduce with example codes. The idea of the reduce operation is the generation of a single result from a collection of values

iReport 2.0.0 Page Numbers and Page Count

This post shows how to create a jasper report using iReport that displays page numbers and page count, e.g., 1/10. Moreover, the iReport will show the page numbers and page

Run Java Applications from Apache Ant and a build file

Back in the day, Apache Ant was king. Nowadays, it is Apache Maven. This post shows how to run a Java application from Ant because using the java compiler alone

Java 8 – Get my current timezone using ZonedDateTime

This post shows how to get your current timezone in Java using ZonedDateTime class. Get Current Timezone Using ZonedDateTime Since Java 8, it is possible to determine your current timezone