Spring data MongoDb: MappingMongoConverter remove _class

后端 未结 10 966
迷失自我
迷失自我 2020-12-04 21:48

The default MappingMongoConverter adds a custom type key (\"_class\") to each object in the database. So, if I create a Person:

package my.d         


        
10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 22:28

    you just need to add the @TypeAlias annotation to the class defintion over changing the type mapper

提交回复
热议问题