Category Archives: Spring Boot

Can JPA entity have a field not mapped to DB column?

JPA stands for Java Persistence API. It is a specification for managing relational databases in Java applications. JPA is a part of Java EE (Enterprise Edition), and it is used for persisting, retrieving and managing Java objects in a relational database. It provides facilities for developers to interact with the relational database using object-oriented programming… Read More »

What is Sonarlint? How to add Sonarlint in Eclipse?

Sonarlint by Sonar is a free extension for our development environments that covers all the most popular programming languages. Like spell checker, Sonarlint squiggles coding issues and performs on-the-fly analysis to detect common mistakes, tricky bugs, and security vulnerabilities. Along with this, it also teaches us clean coding practices. This way, it helps us spend… Read More »

How to inject Collection name in @Document from properties file in Spring Boot?

Sometimes in enterprise applications, we are required to configure the collection name from the properties file to our entity (model) class instead of hardcoding the collection name. In this tutorial, we will learn to inject Collection name in @Document from properties file. Steps to inject Collection name in @Document from properties file We are using… Read More »

How to convert Java Object to YAML file?

YAML stands for YAML Ain’t Markup Language is also known as Yet Another Markup Language. It is generally used for configuration files and the data exchange between languages with different data structures. Given below is an example of a YAML file representing information about a website: Java Object to YAML file In this tutorial, we are… Read More »

Lombok is not generating Getter and Setter?

Lombok is a popular Java library that simplifies Java application development by reducing boilerplate code and making our codebase clean and easy to understand. It is an annotation-based library that provides several annotations to be used in Java classes to automatically generate the biolerplate codes for getters, setters, constructors, etc. These annotations are processed at… Read More »

Spring Batch 5 tutorial – Read from MySQL and Write to MongoDB

Spring Batch is an open-source framework and one of the core modules of Spring Framework. It is used to create a robust batch processing application that provides error handling, recovery mechanisms, easy scalability, and parallel processing of large volumes of data in Java enterprise applications (J2EE). In this tutorial, we are going to use a… Read More »

How to make YAML to Java object

YAML stands for YAML Ain’t Markup Language also know as Yet Another Markup Language, It is a popular configuration format used to define application properties and settings in a more human-readable manner. It is an alternative to the traditional properties file format (.properties), commonly used in Java applications. In this tutorial, we will learn to… Read More »

How to configure multiple database in Spring Boot

In Enterprise applications, we may be required to have multiple databases for storing different kinds of information. For example, in an e-commerce application, it may be required to keep the user’s information in a different database, product-related information in a different database, and payment-related information in a separate database. In this tutorial, we will configure… Read More »