life is too short for a diary



Posts Tagged: spring boot (Page 3)

Handling Multiple Beans of the Same Type in Spring with Qualifier

In Spring application, it's common to have multiple beans of the same type. However, this can lead to issues when Spring tries to autowire these beans, as it doesn't know which bean to inject. This problem can be resolved using Qualifier annotation...

Continue reading → spring boot spring



Getting Started with Spring AI

In this blog, we'll explore how to create a simple Spring Boot application that leverages Spring AI for generating responses. We'll build a BooksApi application that can tell us which book won the booker prize for a given year...

Continue reading → spring boot



Delving into CommandLineRunner in Spring Boot

Spring Boot provides a range of functionalities that allow developers to run specific code blocks during the application's lifecycle. One such feature is the CommandLineRunner interface. This interface is specifically designed to execute a code block just once, right after the Spring Boot application has initialized. This can be particularly useful for tasks like database seeding, running sanity checks, or any other initialization logic you want to run before your application begins processing...

Continue reading → spring boot