Please use 'MongoMappingContext#setAutoIndexCreation(boolean)' or override 'MongoConfigurationSupport#autoIndexCreation()' to be explicit

前端 未结 3 1611
猫巷女王i
猫巷女王i 2020-12-06 02:50

I went through https://docs.spring.io/spring-data/mongodb/docs/2.2.0.RC1/reference/html/#mapping-usage and other sources on the web, but the solution did not worked for me.<

3条回答
  •  孤城傲影
    2020-12-06 03:14

    But the solution doensn't work well, at least within the reactive context. The mongoMappingContext.getPersistentEntities() is empty at this time. Only auto-index-creation: true (or even mongoMappingContext.setAutoIndexCreation(true)) ensure the creation of indexes.

提交回复
热议问题