Spring boot and Lucene configuration example

In this tutorial, we will set up a Spring boot application to use Hibernate search with a Lucene indexing backend. This tutorial assumes that you already have a working Spring boot application with JPA/Hibernate configured. Please check out our tutorial “Getting started with Spring boot 2 and JPA” if you are new to Spring boot and […]

Configuring XStream to convert Java objects to and from XML

Serializing Java objects to and from XML is a necessary operation in many software systems. For example, when communicating with other systems and back-ends, or simply when storing and loading data. In this tutorial, we will discuss how to use the XStream library to convert Java objects to and from XML. What is XStream XStream […]

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

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

In this post, we will discuss the @PrePersist and the @PreUpdate annotations and how and why they are used in a JPA / Hibernate environment. Please also check out our guide for the @PostLoad and @PostUpdate annotations in order to be aware of all the important pre and post processing annotations in JPA. What are […]

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

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

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 […]

Prototype vs Singleton Spring Beans – How-to, Differences and Uses

In this post, we will discuss two different types of Spring beans, namely singleton and prototype beans. We will also discuss when is it preferred 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 only once. Either […]

Scroll to top