Skip to content

chornthorn/spring-boot-api-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot RESTful API

This is a Java-based project using Spring Boot and Maven. The project is structured around a RESTful API and includes JWT authentication and keycloak and custom response body advice.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Java 17 or higher
  • Maven
  • IntelliJ IDEA 2023.2.5 or any preferred IDE
  • Docker Engine 20.10.8 or higher
  • Keycloak 22.0.2 or higher

Installing

  1. Clone the repository
  2. Open the project in your IDE
  3. Run mvn clean install to build the project

Running the tests

Explain how to run the automated tests for this system.

Built With

  • Java - The programming language used
  • Spring Boot - The framework used
  • Maven - Dependency Management
  • Keycloak - Open Source Identity and Access Management

Authors

  • CHORN Thorn

Project Structure (tree)

├── LICENSE
├── README.md
├── docker-compose.yaml
├── mvnw
├── mvnw.cmd
├── pom.xml
└── src
    ├── main
    │   ├── java
    │   │   └── com
    │   │       └── khodedev
    │   │           └── app
    │   │               ├── Application.java
    │   │               ├── auth
    │   │               │   ├── AuthController.java
    │   │               │   ├── AuthService.java
    │   │               │   └── dto
    │   │               │       ├── LoginDto.java
    │   │               │       ├── LoginResDto.java
    │   │               │       └── RegisterDto.java
    │   │               ├── common
    │   │               │   ├── advice
    │   │               │   │   └── CustomResponseBodyAdvice.java
    │   │               │   ├── annotations
    │   │               │   │   ├── PreAuthz.java
    │   │               │   │   ├── Public.java
    │   │               │   │   └── SkipResponseWrapper.java
    │   │               │   ├── config
    │   │               │   │   ├── ApplicationConfig.java
    │   │               │   │   └── SecurityConfig.java
    │   │               │   ├── constants
    │   │               │   │   └── Constants.java
    │   │               │   ├── controllers
    │   │               │   │   └── CustomErrorController.java
    │   │               │   ├── exceptions
    │   │               │   │   ├── BadRequestException.java
    │   │               │   │   ├── ForbiddenException.java
    │   │               │   │   ├── GlobalExceptionHandler.java
    │   │               │   │   ├── InternalServerErrorException.java
    │   │               │   │   ├── NotFoundException.java
    │   │               │   │   ├── UnauthorizedException.java
    │   │               │   │   └── UnprocessableEntityException.java
    │   │               │   ├── filters
    │   │               │   │   ├── JwtAuthenticationFilter.java
    │   │               │   │   ├── PreAuthzFilter.java
    │   │               │   │   └── PublicAccessFilter.java
    │   │               │   ├── services
    │   │               │   │   ├── JwtTokenValidator.java
    │   │               │   │   └── KeycloakAuthorizationService.java
    │   │               │   └── types
    │   │               │       ├── ErrorResponse.java
    │   │               │       ├── ResponseWrapper.java
    │   │               │       └── Scope.java
    │   │               └── user
    │   │                   ├── UserController.java
    │   │                   ├── UserRepository.java
    │   │                   ├── UserService.java
    │   │                   ├── dto
    │   │                   │   ├── CreateUserDto.java
    │   │                   │   └── UpdateUserDto.java
    │   │                   └── entities
    │   │                       └── User.java
    │   └── resources
    │       └── application.properties
    └── test
        └── java
            └── com
                └── khodedev
                    └── app
                        └── ApplicationTests.java

License

This project is licensed under the MIT License - see the LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages