retheviper / SpringBootSample

A simple sample of Spring Boot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Boot Sample

TL;DR

A simple sample of Rest API by Spring Boot with Java 11.

Includes

Architecture

  • web: Remoting layer
    • config: Configuration classes
    • controller: Rest controllers
    • form: Request bodies
    • interceptor: Interceptors
    • security: Utilities for security
    • viewmodel: Response bodies
  • domain: Business logic and data access layer
    • application: Business logics
      • config: Configuration classes
      • dto: DTOs
      • sevice: Service classes
      • common: Constants, exception, utilities
    • domain: Data access
      • entity: Entities
      • repository: Repositories

Test APIs

  1. Run server.
./gradlew bootRun
  1. Import Postman data from below.
/miscs/SpringBootSample.postman_collection.json
  1. Test with Postman.

Note: Some APIs need JWT on HTTP Request Header(X-AUTH-TOKEN) and it will be found at HTTP Response Header when successfully logged in.

Swagger

http://localhost:8080/api/v1/web/swagger-ui/index.html

About

A simple sample of Spring Boot.

License:Apache License 2.0


Languages

Language:Java 100.0%