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.
- 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.
- Java Development Kit (JDK)
- Maven
- Spring Boot
- Postman (for token generation)
- Clone this repository:
git clone https://github.com/Hugs-4-Bugs/Blog_Application-SpringBoot-Project - Navigate to the project directory:
cd Blog_Application-SpringBoot-Project - Build the project:
mvn clean install - Run the application:
mvn spring-boot:run
-
Generate Authentication Token:
- Use Postman to send a request to the authentication endpoint and obtain an access token.
- Example:
POST /api/authenticate
-
Accessing Endpoints:
- Use the generated token in the header for subsequent requests to access secured endpoints.
- Example:
GET /api/poststo retrieve all blog posts.
-
Perform CRUD Operations:
- Use appropriate HTTP methods (
GET,POST,PUT,DELETE) with respective endpoints to manage blog posts.
- Use appropriate HTTP methods (
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.
Contributions are welcome! If you have any suggestions, improvements, or new features to add, feel free to create a pull request.
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!