The Javadoc of MongoJobRepositoryFactoryBean provides all the need that you need
|
* template and a mongo transaction manager. <strong>The mongo template must be configured |
|
* with a {@link MappingMongoConverter} having a {@code MapKeyDotReplacement} set to a non |
|
* null value. See {@code MongoDBJobRepositoryIntegrationTests} for an example. This is |
|
* required to support execution context keys containing dots (like "step.type" or |
|
* "batch.version")</strong> |
However, this concretely makes you create a MongoTemplate for the purpose of Spring Batch as such requirement is unusual.
I am not an expert but asked @mp911de and he's suggesting to:
not use dots in field/property names and instead do the translation differently, by e.g. creating a subdocument after a property terminates at a dot.
If that's not practical, I'd suggest to deprecate protected MongoOperations getMongoOperations() and create one using MongoDatabaseFactory (that should be provided as a new getter).
The Javadoc of
MongoJobRepositoryFactoryBeanprovides all the need that you needspring-batch/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/MongoJobRepositoryFactoryBean.java
Lines 33 to 37 in 0c91fa4
However, this concretely makes you create a
MongoTemplatefor the purpose of Spring Batch as such requirement is unusual.I am not an expert but asked @mp911de and he's suggesting to:
If that's not practical, I'd suggest to deprecate
protected MongoOperations getMongoOperations()and create one usingMongoDatabaseFactory(that should be provided as a new getter).