fix autowiring of mongoTemplate