Blog Application

This is a simple blogging application developed using Spring Security for authentication and authorization. The application allows users to create, read, update, and delete blog posts.

Features

  • User Authentication: Implemented with Spring Security to manage user access.
  • Token Generation: Utilizes Postman for generating authentication tokens.
  • CRUD Operations: Allows users to Create, Read, Update, and Delete blog posts.

Getting Started

Prerequisites

  • Java Development Kit (JDK)
  • Maven
  • Spring Boot
  • Postman (for token generation)

Installation

  1. Clone this repository: git clone https://github.com/Hugs-4-Bugs/Blog_Application-SpringBoot-Project
  2. Navigate to the project directory: cd Blog_Application-SpringBoot-Project
  3. Build the project: mvn clean install
  4. Run the application: mvn spring-boot:run

Usage

  1. Generate Authentication Token:

    • Use Postman to send a request to the authentication endpoint and obtain an access token.
    • Example: POST /api/authenticate
  2. Accessing Endpoints:

    • Use the generated token in the header for subsequent requests to access secured endpoints.
    • Example: GET /api/posts to retrieve all blog posts.
  3. Perform CRUD Operations:

    • Use appropriate HTTP methods (GET, POST, PUT, DELETE) with respective endpoints to manage blog posts.

API Endpoints

  • POST /api/authenticate: Generate authentication token.
  • GET /api/posts: Retrieve all blog posts.
  • GET /api/posts/{id}: Retrieve a specific blog post by ID.
  • POST /api/posts: Create a new blog post.
  • PUT /api/posts/{id}: Update an existing blog post.
  • DELETE /api/posts/{id}: Delete a blog post by ID.

Contribution

Contributions are welcome! If you have any suggestions, improvements, or new features to add, feel free to create a pull request.

License

This project is licensed under the MIT License.


Feel free to add or modify sections as needed to better describe your project and its functionalities!