How to Enable Spring Data MongoDB Auto Index Creation

Overview If you have tried setting auto-index-creation in spring data mongodb without success, like this: Then this post will show you how to work around this. Let’s get started. Enable auto index creation in MongoDB First, let’s consider this document Here, I defined an unique index for my document named rate_limit_config_service_name but when the application … Read more

6 Ways To Directly Initialize a HashMap in Java

Java provides several ways to initialize a HashMap directly, making your code more concise and readable. In this blog post, we’ll explore different methods to create and populate a HashMap in one go using Java. 1. Using Map.of() (Java 9+) For small, immutable maps, you can use the Map.of() method: This method is convenient but … Read more

Using MessageSource In Spring Boot Application

Overview Nowadays, creating applications that serve users from different countries with different languages and dialects is a common practice. How to make your application friendly to users across the globle? That’s what we are going to find out today. I18n and l10n Internationalization (i18n) is the process of designing your software ready to serve people … Read more