Organized, streamlined design for easy code maintenance. Single endpoint supports flexible search.
1.7K
Please see the article : Spring Boot: how to design an efficient search REST API?
docker pull raouf25/spring-boot-efficient-search-api:latest
This command retrieves the latest version of the Docker image "raouf25/spring-boot-efficient-search-api" from Docker Hub. The :latest tag specifies fetching the most recent version of the image.
docker run -t -p 8081:8080 raouf25/spring-boot-efficient-search-api
This command creates and starts a container from the downloaded image. It allocates a pseudo-TTY (-t) for possible terminal interaction and maps port 8080 from the container to port 8081 on the host system (-p 8081:8080).
curl -s 'http://localhost:8081/api/cars?country=Japan&sort=createDate,desc&limit=100&offset=2' | jq
This command uses cURL to send a request to the API exposed by the Spring Boot application running in the container. The query parameters specify filters such as country, sorting, limit, and offset. The result is then processed by jq for formatted display.
Ensure that the container is running before making the cURL request. You can stop the container using Ctrl+C in the terminal where it's running.
Note: The use of the jq tool requires it to be installed on your machine. You can install it by following the instructions on the official website: jq Download
Content type
Image
Digest
sha256:250a5faf4…
Size
98.2 MB
Last updated
7 months ago
docker pull raouf25/spring-boot-efficient-search-api