The Journal REST API is a Spring Boot application designed to manage journal entries for users. It provides endpoints for creating, reading, updating, and deleting journal entries, as well as user management functionalities.
Clone the repository:
git clone https://github.com/yourusername/Journal-Rest-API.git
cd Journal-Rest-API
Build the project:
mvn clean install
Run the application:
mvn spring-boot:run
The application uses a MongoDB database. Ensure that MongoDB is running and accessible. You can configure the MongoDB connection in the application.properties
file.
spring.data.mongodb.uri=mongodb://localhost:27017/yourdatabase
Here is the postman collection, import it Journal App postman_collection
POST /public/create-user
{
"userName": "string",
"password": "string"
}
GET /journal
GET /journal/{id}
POST /journal
{
"title": "string",
"content": "string"
}
PUT /journal/{id}
{
"title": "string",
"content": "string"
}
DELETE /journal/{id}
GET /admin
DELETE /admin/{userName}
GET /health
The application uses Spring Security for authentication and authorization. The following roles are defined:
Contributions are welcome! Please fork the repository and submit a pull request. Create an issue first before PR.
If you are a Spring Boot learner, we encourage you to debug this application and contribute to its improvement. Here are some steps to get started: