https://github.com/mongodb-developer/mdb-java-workshop
In this hands-on session, you’ll learn essential concepts such as using MongoTemplate for data access, implementing object mapping with Spring Data MongoDB, leveraging data repositories for CRUD operations, and harnessing the power of aggregation pipelines for advanced querying.
https://github.com/mongodb-developer/mdb-java-workshop
csfle java mongodb spring-data
Last synced: about 2 months ago
JSON representation
In this hands-on session, you’ll learn essential concepts such as using MongoTemplate for data access, implementing object mapping with Spring Data MongoDB, leveraging data repositories for CRUD operations, and harnessing the power of aggregation pipelines for advanced querying.
- Host: GitHub
- URL: https://github.com/mongodb-developer/mdb-java-workshop
- Owner: mongodb-developer
- License: apache-2.0
- Created: 2024-05-09T19:19:45.000Z (about 2 years ago)
- Default Branch: session1-complete
- Last Pushed: 2024-05-27T15:08:19.000Z (about 2 years ago)
- Last Synced: 2025-04-12T16:18:15.728Z (about 1 year ago)
- Topics: csfle, java, mongodb, spring-data
- Language: Java
- Homepage: https://mongodb-developer.github.io/mongodb-sprout-workshop/
- Size: 83 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Quick Start Project
This repository contains code samples for the Quick Start blog post series.
You can read more about the Quick Start series on the [MongoDB Developer Hub](https://www.mongodb.com/developer/).
# MongoDB Cluster
To get started with MongoDB Atlas and get a free cluster read [this blog post](https://developer.mongodb.com/quickstart/free-atlas-cluster).
# Requirements
- Java 21
- Maven 3.8+
# MongoDB URI
Add MongoDB Atlas Cluster URI in # src/main/resources/application.properties:
```
spring.data.mongodb.uri=mongodb+srv://:@/?retryWrites=true&w=majority
```
# Command lines
- Compile:
```sh
mvn clean compile
```
- Run the `Create` class:
```sh
mvn spring-boot:run -Dspring-boot.run.arguments=create
```
- Run the `Read` class:
```sh
mvn spring-boot:run -Dspring-boot.run.arguments=read
```
- Run the `Update` class:
```sh
mvn spring-boot:run -Dspring-boot.run.arguments=update
```
- Run the `Delete` class:
```sh
mvn spring-boot:run -Dspring-boot.run.arguments=delete
```
- Run the `MappingPOJO` class:
```sh
mvn spring-boot:run -Dspring-boot.run.arguments=mapping
```