Add Spring Boot auto-configuration module

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.0.0
    • Affects Version/s: None
    • Component/s: Configuration
    • None
    • 5
    • None
    • Needed
    • Hide

      Complexity: Complex (net-new guide/section covering the whole starter)

      Framework and Library Support + a new Spring Boot guide: document the Spring Boot 4.x starter - activation via standard spring.jpa.* properties (no bespoke config), reuse of the application's single MongoClient, Spring Data JPA repository support without a SQL DataSource, inert-when-not-MongoDB behavior, fail-fast on misconfiguration, and the default field naming (no camelCase->snake_case) with an override. Align with the README starter section.

      Show
      Complexity: Complex (net-new guide/section covering the whole starter) Framework and Library Support + a new Spring Boot guide: document the Spring Boot 4.x starter - activation via standard spring.jpa.* properties (no bespoke config), reuse of the application's single MongoClient , Spring Data JPA repository support without a SQL DataSource , inert-when-not-MongoDB behavior, fail-fast on misconfiguration, and the default field naming (no camelCase->snake_case) with an override. Align with the README starter section.
    • None
    • None
    • None
    • None
    • None
    • None

      Goal

      Let a Spring Boot 4.x application use MongoDB-backed JPA (via the MongoDB Extension for Hibernate ORM)
      with minimal, idiomatic configuration — a plain @SpringBootApplication, no knowledge of Hibernate,
      JPA, or Spring Boot internals, and no manual bean wiring.

      Requirements

      • Activate and connect through standard Spring configuration (Spring's MongoDB connection setup plus the
        standard spring.jpa.* properties), not bespoke properties or custom annotations.
      • Reuse the application's single MongoClient / connection pool — never open a second pool to the same
        cluster when the application also uses Spring's MongoDB support, and never take over the client's
        lifecycle.
      • Honor the full spring.jpa.* surface (ddl-auto, show-sql, naming strategies, Hibernate/EMF
        customizer beans), as in any Spring Boot JPA application.
      • Provide Spring Data JPA repository support without requiring a SQL DataSource.
      • Stay completely inert when MongoDB-JPA is not intended — e.g. a SQL-JPA application that merely has the
        module on its classpath, or a Spring Data MongoDB application that has a MongoClient but no Hibernate
        JPA — with no interference to a SQL persistence unit.
      • Default field naming so documents are not silently reshaped relative to plain Hibernate (no surprise
        camelCase → snake_case on a schemaless store); allow an explicit override.
      • Fail fast with an actionable message when activated but misconfigured (e.g. no MongoClient available, or
        no database name resolvable).
      • Offer an escape hatch for advanced cases (a dedicated client, multiple persistence units) without
        fighting the auto-configuration.

      Compatibility

      Spring Boot 4.x; Hibernate ORM 7.3 or later. (Spring Boot's dependency management may force an older
      Hibernate from its BOM; until a Boot release ships 7.3+, the application overrides the managed version.)

            Assignee:
            Jeffrey Yemin
            Reporter:
            Jeffrey Yemin
            Almas Abdrazak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: