Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
agoston authored Dec 8, 2020
1 parent 4a40645 commit 6108f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ To circumvent the `_class` feature of `spring-data-mongodb`, install a custom mo
```java
@Override
@Bean
public MappingMongoConverter mappingMongoConverter() throws Exception {
MappingMongoConverter converter = super.mappingMongoConverter();
public MappingMongoConverter mappingMongoConverter(MongoDatabaseFactory databaseFactory, MongoCustomConversions customConversions, MongoMappingContext mappingContext) {
MappingMongoConverter converter = super.mappingMongoConverter(databaseFactory, customConversions, mappingContext);
// NB: without overriding defaultMongoTypeMapper, an _class field is put in every document
// since we know exactly which java class a specific document maps to, this is surplus
converter.setTypeMapper(new DefaultMongoTypeMapper(null));
Expand Down

0 comments on commit 6108f77

Please sign in to comment.