https://github.com/sd-amitkumar/springboot-thymeleaf-crud-webmvcapp
Spring Boot CRUD Web application Crud operation using Spring Boot, ThymeLeaf, Spring Data JPA, Hibernate, MySQL database
https://github.com/sd-amitkumar/springboot-thymeleaf-crud-webmvcapp
docker email-sender github-config java mysql restful-webservices spring-boot spring-security springdata-jpa springmvc swagger-ui
Last synced: about 2 months ago
JSON representation
Spring Boot CRUD Web application Crud operation using Spring Boot, ThymeLeaf, Spring Data JPA, Hibernate, MySQL database
- Host: GitHub
- URL: https://github.com/sd-amitkumar/springboot-thymeleaf-crud-webmvcapp
- Owner: SD-Amitkumar
- Created: 2023-08-31T13:05:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T11:57:31.000Z (over 1 year ago)
- Last Synced: 2025-07-09T12:06:41.930Z (11 months ago)
- Topics: docker, email-sender, github-config, java, mysql, restful-webservices, spring-boot, spring-security, springdata-jpa, springmvc, swagger-ui
- Language: Java
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Spring Boot CRUD Application with Swagger, Mail Service, and Authentication
Project Overview
This Spring Boot application implements a robust backend system with various services, including CRUD operations,
Swagger documentation for API testing, mail services, and secure authentication/authorization.
It is designed to provide a foundation for scalable and maintainable backend applications.
Key Features
CRUD Operations: Implemented for managing entities in the system.
Swagger Integration: Provides interactive API documentation for easy testing and interaction.
Mail Service: Configured to send emails for various system notifications.
Authentication & Authorization: Secure API access using JWT (JSON Web Tokens) for authentication and role-based authorization.
Technologies Used
Spring Boot: For building the application.
Spring Data JPA: For database interaction.
Swagger: For API documentation and testing.
JWT: For secure authentication and authorization.
Spring Mail: For sending emails.
Setup and Installation
Prerequisites
Java 17+ (or any compatible version)
Maven (or Gradle)
MySql
Steps to Set Up
Clone the repository:
bash
Copy
Edit
git clone https://github.com/your-username/your-repository-name.git
Navigate to the project directory:
bash
Copy
Edit
cd your-repository-name
Configure application properties:
Open src/main/resources/application.properties
Set up your database connection, mail configurations, and JWT settings.
Run the application:
You can start the Spring Boot application with Maven or your preferred build tool.
bash
Copy
Edit
mvn spring-boot:run
Access Swagger API Docs:
Once the application is running, navigate to http://localhost:8080/swagger-ui/ to access the Swagger UI and test the APIs interactively.
API Endpoints
Authentication
POST /api/auth/login: Authenticate user and retrieve JWT.
CRUD Operations
GET /api/entities: Retrieve all entities.
GET /api/entities/{id}: Retrieve a specific entity by ID.
POST /api/entities: Create a new entity.
PUT /api/entities/{id}: Update an existing entity.
DELETE /api/entities/{id}: Delete an entity by ID.
Mail Service
POST /api/mail/send: Send an email via the configured mail service.
Authentication & Authorization
The application uses JWT for secure authentication:
Upon login, a JWT token is generated and returned.
The token is used for authorization on all protected routes via the Authorization header (Bearer ).
Contributing
If you'd like to contribute to this project:
Fork the repository.
Create a new branch (git checkout -b feature/your-feature).
Commit your changes (git commit -am 'Add new feature').
Push to the branch (git push origin feature/your-feature).
Open a pull request.
License
This project is licensed under the MIT License.
Contact
For any questions or inquiries, feel free to reach out via email:kumar930amit@gmail.com