Spring Boot: How to Add Conditional Annotations Because sometimes you need a Spring-managed component, and sometimes you don't.
Spring Boot and MongoTemplate: How to Use Conditionals in Aggregations Did you know that you can put conditionals in your MongoDB aggregation pipelines? Even better: you can do so within your Spring Boot application using MongoTemplate.