Skip to content

[Docs+] Implementing Bulk Writes using Spring Boot for MongoDB #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rachel-mack
Copy link
Contributor

@rachel-mack rachel-mack commented May 20, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-48901
Original post - https://www.mongodb.com/developer/languages/java/java-spring-bulk-writes/

Staging Links

  • integrations/spring-data-integration
  • integrations
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?
    • Are the facets and meta keywords accurate?
    • Are the page titles greater than 20 characters long and SEO relevant?

    Copy link

    netlify bot commented May 20, 2025

    Deploy Preview for docs-java ready!

    Name Link
    🔨 Latest commit 414fcf1
    🔍 Latest deploy log https://app.netlify.com/projects/docs-java/deploys/684c6388afc08f000897d8ca
    😎 Deploy Preview https://deploy-preview-687--docs-java.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify project configuration.

    @rachel-mack rachel-mack marked this pull request as ready for review June 13, 2025 17:53
    @rachel-mack rachel-mack requested a review from a team as a code owner June 13, 2025 17:53
    @rachel-mack rachel-mack requested review from vbabanin and removed request for a team June 13, 2025 17:53
    Spring Data MongoDB
    ~~~~~~~~~~~~~~~~~~~

    Spring Data MongoDB is the official Spring Data ODM for MongoDB. It allows you to
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    Spring Data MongoDB is the official Spring Data ODM for MongoDB. It allows you to
    Spring Data MongoDB is the official Spring Data object document mapper (ODM) for MongoDB. It allows you to

    Also found this article by Alex Bevi about ODMs etc. Interestingly, he calls it a Java ORM; probably good to sync with him on our official terminology.

    Dependency Injection
    ~~~~~~~~~~~~~~~~~~~~

    Dependency injection (DI) is a core principle of the Spring Framework. It
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Q: worth explaining Spring Framework vs. Spring Boot? I'm new to both and had to look it up.

    ~~~~~~~~~~~~~~~~~~~~

    Dependency injection (DI) is a core principle of the Spring Framework. It
    allows objects, called beans, to be created and managed by the Spring container,
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I: italics

    Suggested change
    allows objects, called beans, to be created and managed by the Spring container,
    allows objects, called *beans*, to be created and managed by the Spring container,

    Dependency injection (DI) is a core principle of the Spring Framework. It
    allows objects, called beans, to be created and managed by the Spring container,
    then injected into other beans that use them. This is distinct from typical
    object-oriented development where classes are responsible for initializing and
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    object-oriented development where classes are responsible for initializing and
    object-oriented development, where classes are responsible for initializing and

    allows objects, called beans, to be created and managed by the Spring container,
    then injected into other beans that use them. This is distinct from typical
    object-oriented development where classes are responsible for initializing and
    constructing the objects they use.
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    constructing the objects they use.
    constructing the objects that they use.

    :start-after: # start-mongoconfig-properties
    :end-before: # end-mongoconfig-properties
    :language: console
    :dedent:
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    :dedent:

    section of the Spring Data MongoDB documentation.

    The ``@Id`` annotation in the following code indicates that the ``id`` field
    maps to the ``_id`` field which is used as a unique identifier in MongoDB documents. You can choose any field of
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    maps to the ``_id`` field which is used as a unique identifier in MongoDB documents. You can choose any field of
    maps to the ``_id`` field, which is used as a unique identifier in MongoDB documents. You can choose any field of

    :start-after: // start-products-class
    :end-before: // end-products-class
    :language: java
    :dedent:
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    :dedent:

    Define a Repository to Store Your Products
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    The ``ProductRepository`` will manage a collection of ``Product`` objects.
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    The ``ProductRepository`` will manage a collection of ``Product`` objects.
    The ``ProductRepository`` object will manage a collection of ``Product`` objects.

    applies throughout as needed

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    The ``ProductRepository`` will manage a collection of ``Product`` objects.
    Your ``ProductRepository`` references the client creation methods defined in the ``MongoConfig`` class, which you
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    Your ``ProductRepository`` references the client creation methods defined in the ``MongoConfig`` class, which you
    Your ``ProductRepository`` references the client-creation methods defined in the ``MongoConfig`` class, which you

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants