Skip to content

Spring Boot RESTful API demo

Notifications You must be signed in to change notification settings

ojwm/java-api-rest

Repository files navigation

Spring Boot RESTful API Demo

Execution

Visual Studio Code

Install Spring Boot Extension Pack and start the application from the Spring Boot Dashboard.

Shell

./mvnw spring-boot:run

Docker

docker build --tag java-api-rest .
docker run --name java-api-rest --publish 8080:8080 java-api-rest

Podman

If using macOS, start the Podman machine first.

podman machine init
podman machine start
podman build --tag java-api-rest .
podman run --name java-api-rest --publish 8080:8080 java-api-rest

Documentation

REST client

Thunder Client can be used to interact with the API.
A predefined collection is saved in /thunder-tests.

Folder structure

src
├── main
│   ├── java/com/github/ojwm/api/rest
│   │   ├── RestApplication.java        # Spring Boot application
│   │   ├── model                       # Object models
│   │   │   ├── Car.java
│   │   │   └── Van.java
│   │   └── repository                  # Object repositories
│   │       ├── VanRepository.java
│   │       └── CarRepository.java
│   └── resources                       # Configuration and static resources
│       └── application.properties
└── test
    └── java/com/github/ojwm/api/rest   # Structure mirrors main

Generated by tree.

About

Spring Boot RESTful API demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published