Configuring @PostLoad and @PostUpdate in JPA/Hibernate

Configuring @PostLoad and @PostUpdate in JPA/Hibernate

In this post we will discuss how to use the @PostLoad and @PostUpdate annotations in Hibernate/JPA. This tutorial assumes that you have some knowledge of the @PreUpdate and @PrePersist annotations. If you are not familiar with these annotations, then please check our earlier post here. What are the @PostLoad and @PostUpdate annotations The @PostLoad and […]

Java Switch Statements – Uses, Advantages and Restrictions

Java Switch Statements – Uses, Advantages and Restrictions

In this tutorial, we will discuss what are Java switch statements, how to use them, the allowed data types that can be used in the switch statements and the advantages and restrictions that apply to them.   What is a “switch” statement   A “switch” statement in Java¬† is a conditional operator used to direct […]

How to use @PrePersist and @PreUpdate in JPA/Hibernate

How to use @PrePersist and @PreUpdate in JPA/Hibernate

In this post, we will discuss the @PrePersist and the @PreUpdate annotations and how and why they are used in a JPA / Hibernate environment. What are the @PrePersist and @PreUpdate annotations The @PrePersist and @PreUpdate annotations are  JPA annotations introduced in JPA 1.0. Both annotations are callback annotations which are called on specific entity […]

9 Reasons for keeping software dependencies up to date

9 Reasons for keeping software dependencies up to date

In this post, we will explore nine reasons why keeping software dependencies up to date is a very important task, and why it should be part of every software developer’s work routine.   Keeping software secure   Upgrading your software dependencies does not only provide you with the latest and greatest features and APIs, but […]

Auditing using Spring boot, MongoDB and JaVers

Auditing using Spring boot, MongoDB and JaVers

In this tutorial, we will discuss how to audit data and generating audit logs and data history entries using JaVers in a Spring boot and MongoDB environment. Prerequistes If you currently do not have a Spring boot environment set up with a MongoDB backend, then we suggest that you check out our Spring boot and MongoDB […]

Spring boot and MongoDB configuration example

Spring boot and MongoDB configuration example

In this post, we will configure a Spring boot application to use a MongoDB persistence back-end. Introduction MongoDB is NoSQL, cross-platform, document based database engine. It was initially release in 2009 but has been increasingly popular over the years thanks to its scaleability and increased popularity of NoSQL database systems. Unlike traditional relational database systems […]

What is a BigInteger and how to use it in Java

What is a BigInteger and how to use it in Java

    A BigInteger is a data structure in Java that is used to represent very large numerical values that would otherwise not fit within a primitive data type such as an int or long. In this post, we will discuss different ways to initialize a BigInteger and how to use it to perform mathematical […]

Prototype vs Singleton Spring Beans – Differences and uses

Prototype vs Singleton Spring Beans – Differences and uses

In this post, we will discuss two different types of Spring beans, singleton and prototype beans and we will also discuss when to use prototype beans and when to use singleton beans. Singleton beans Most beans that you will use or encounter are singleton beans. Singleton beans are initialized once, either when the application context […]

A Simple Java Program to Find Prime Numbers Between 1 and 100

A Simple Java Program to Find Prime Numbers Between 1 and 100

In this post, we will discuss how to write a simple Java program to find prime numbers between 1 and 100. We will be using a simple algorithm implemented in nested loops. So let us get started!   What is a prime number?   A prime number is a number which can only be divided […]

How to Encrypt/Decrypt files and byte arrays in Java using AES-GCM

How to Encrypt/Decrypt files and byte arrays in Java using AES-GCM

In this post, we will discuss how to encrypt and decrypt a file using the AES encryption algorithm in GCM mode. We will start by writing a file reader / writer to read and write files into byte arrays. Then we will attempt to encrypt and decrypt these byte arrays. This example has been written […]

We have been releasing new content since over a year now (yay!).

To improve our website, we would like to ask for your help filling out a short survey.

We only need 5 minutes of your time to tell us your opinion about our website. We will not ask for your email address!

Thank you very much!

Survey link: here