In my project we are using MongoTemplate, which is injected by spring
private final MongoTemplate mongoTemplate;
I know mongo template implements MongoOperations, ApplicationContextAware, so we get context aware method with template, which we do not get if I use the mongo operation type object like below (spring will inject mongo template object in it)
private final MongoOperations mongoOperations;
My doubt is 1. Are we not violating "programming to interface" paradigm doing that 2. Which pattern should we use and why?