December 6, 2023

Conditional Beans with Spring Boot

Spring has introduced the @Conditional annotation that allows us to define custom conditions to apply to parts of our application context. Spring Boot builds on top of that and provides some pre-defined conditions so we don’t have to implement them ourselves. In this tutorial, we’ll have a look some use cases that explain why we would need conditionally loaded beans at all. Then, we’ll see how to apply conditions and which conditions Spring Boot offers. To round things up, we’ll also implement a custom condition.

Conditional Beans with Spring Boot Read More

Running Scheduled Jobs in Spring Boot

Scheduling is the process of executing a piece of logic at a specific time in the future. Scheduled jobs are a piece of business logic that should run on a timer. Spring allows us to run scheduled jobs in the Spring container by using some simple annotations. In this article, we will illustrate how to configure and run scheduled jobs in Spring Boot applications.

Running Scheduled Jobs in Spring Boot Read More