anchor.diff:  As with the JPA repositories discussed earlier, the basic principle is that queries are constructed automatically, based on method names.
   
   In fact, both Spring Data JPA and Spring Data MongoDB share the same common infrastructure.
  -You could take the JPA example from earlier and, assuming that `City` is now a Mongo data class rather than a JPA `@Entity`, it works in the same way, as shown in the following example:
  +You could take the JPA example from earlier and, assuming that `City` is now a MongoDB data class rather than a JPA `@Entity`, it works in the same way, as shown in the following example:
   
   [source,java,indent=0]
   ----
  
positive.code: 
  [[boot-features-connecting-to-mongodb]]
  ==== Connecting to a MongoDB Database
  To access Mongo databases, you can inject an auto-configured `org.springframework.data.mongodb.MongoDatabaseFactory`.
  By default, the instance tries to connect to a MongoDB server at `mongodb://localhost/test`.
  The following example shows how to connect to a MongoDB database:
  
  
negative.code: 		private final MongoDatabaseFactory mongo;
  
  		@Autowired
  		public MyBean(MongoDatabaseFactory mongo) {
  			this.mongo = mongo;
  		}
  
  