Category Spring

Leader election on k8s

food red yellow colorful

The problem Sometimes there are situations on which you have an application and you need to run multiple instances of it, however there is some particular task (or set of tasks) that you would like only one instance to execute.…

@Primary – use wisely

caution danger information safety

On a previous post we revised how to use @Qualifier and how it allows you to disambiguate what Bean to inject, when there are several candidates. However, that is not the the only way you can tell Spring which candidate…