specify the fields value as 0. Ex:
public interface PersonRepository extends MongoRepository<Person, String>
@Query(value="{ 'firstname' : ?0 }", fields="{ 'firstname' : 0}")
List<Person> findByThePersonsFirstname(String firstname);
}
This will not fetch firstname property of the document and value will be null in returned java object.