Spring Boot and MongoTemplate: How to Use Project in Aggregations Sometimes less is more. When you're running a MongoDB aggregation in your Spring Boot app and you don't want to return every field, use the project operation.