MongoDB Configuration

Overwriting default naming strategy

To overwrite the default naming strategy use spring.data.mongodb.field-naming-strategy. For example configure your application.yml like this to set the naming strategy to snake case:

spring:
  data:
    mongodb:
     field-naming-strategy: "org.springframework.data.mapping.model.SnakeCaseFieldNamingStrategy"

For further details and already existing default implementation feel free to have a look into the JavaDoc Spring-Data Interface FieldNamingStrategy .