Category Archives: Spring Boot

File upload in Spring Boot REST API

How to store images in database You can store the images or file in database using the following approaches: Store images in database In this approach, you can directly store the images as a binary file in the database, where while storing the image you can compress it and while retrieving it you can decompress… Read More »

Controller vs RestController in Spring Boot

The Controller and RestController in the Spring framework are both used to handle the HTTP requests, but they have a difference in their intended use and their behaviour. Difference between Controller and RestController Controller RestController The controller in Spring typically handles the traditional web requests and produces the HTML views. RestContoller is specifically designed to… Read More »

@Qualifier annotation in Spring

The @Qualifier annotation in the Spring framework is used along with the @Autowired annotation. When we have two or more beans of the same type, in order to distinguish between them as to which bean should be injected, we use the @Qualifier annotation. @Qualifier annotation in Spring Boot Example Let’s understand this with an example.… Read More »

Spring Boot 3 Observability

What is Observability? Observability is used to observe the internal states of the application through metrics, logs, and traces and gives insight into the functioning of the application. It makes the application more transparent and easier to monitor, troubleshoot, and manage. Steps to implement Observability in Spring Boot 3.0 Spring Boot observability can be easily… Read More »

Spring Boot Session Management using Redis

What is Session Management? Session management in Spring Boot refers to the process of managing user sessions in a web application. Sessions are used to maintain stateful information about the user’s interaction with the application across multiple requests. What is the purpose of Session Management? Following are the benefits of session management: How to do… Read More »

How to add STS plugin in Eclipse?

Spring Tool Suite (STS) is an integrated development environment (IDE) designed to facilitate the development of enterprise Java applications using the Spring framework. STS provides tools and features that streamline the development process, making it easier for developers to create, debug, and deploy Spring-based applications. In this tutorial, we will learn how we can add… Read More »

Spring Boot Scheduler – How to implement task scheduler in Spring Boot?

In Spring Boot, Job scheduler (Spring Boot Scheduler) is a feature that provides the facilities to automate the executions of tasks at specified interval. It is very useful in terms of running background jobs, periodic maintenance activity or any activity that needs to be performed. Spring Boot supports various scheduling strategies which allows us to… Read More »

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 »