A secure RESTful API built using Spring Boot and Spring Security, implementing JWT Authentication and OAuth2 Login (Google/GitHub).
This project demonstrates how to build production-ready backend services with secure authentication and authorization.
- ✅ RESTful API (CRUD Operations)
- 🔐 Secure Authentication using JWT
- 🌐 OAuth2 Login (Google & GitHub)
- 🔑 Role-Based Authorization (RBAC)
- 🧾 Global Exception Handling
- ✅ Input Validation (Hibernate Validator)
- 📦 Layered Architecture (Controller → Service → Repository)
- 🛢️ Database Integration (MySQL / H2)
- Java 17
- Spring Boot
- Spring Security
- JWT (JSON Web Token)
- OAuth2 Client
- Spring Data JPA (Hibernate)
- MySQL / H2 Database
- Maven
- Lombok
com.example.securityapp │ ├── controller/ # Handles HTTP requests ├── service/ # Business logic layer ├── repository/ # Database access layer ├── entity/ # JPA entities ├── dto/ # Request/Response models ├── security/ # JWT & OAuth2 configuration ├── config/ # Application configuration ├── exception/ # Global exception handler └── util/ # Utility/helper classes
Use Postman or any REST client:
Example:
GET /api/accounts
POST /api/users
- Scalable architecture
- Service discovery using Eureka
- Centralized configuration
- API Gateway routing
- Independent deployment
Dharmendra Kumar Java Backend Developer