Hello welcome to this little spring-boot project
- java 21
- maven
- docker (optional)
To build the project there are to options, you can execute the following commands
mvn clean package
docker build -t beer-catalogue .
or execute the build script
docker-build.sh
java -jar target/beer-catalogue-0.0.1-SNAPSHOT.jar
docker run -p 8080:8080 beer-catalogue
There is swagger ui at http://localhost:8080/swagger-ui/index.html available
curl --request POST \
--url http://localhost:8080/api/manufacturer \
--header 'Content-Type: application/json' \
--data '{
"name": "estrella",
"nationality": "spanish"
}'
curl --request GET \
--url http://localhost:8080/api/manufacturer/id/1 \
--header 'Content-Type: application/json'
In this method the param name is optional
curl --request GET \
--url 'http://localhost:8080/api/manufacturer/all?name=&page=0&size=5' \
--header 'Content-Type: application/json'
curl --request PUT \
--url http://localhost:8080/api/manufacturer \
--header 'Content-Type: application/json' \
--data '{
"id": 2,
"name": "miguel",
"nationality": "spanish"
}'
curl --request DELETE \
--url http://localhost:8080/api/manufacturer/3 \
curl --request POST \
--url http://localhost:8080/api/beer \
--header 'Content-Type: application/json' \
--data '{
"name": "estrella",
"graduation": 0.8,
"description": "beer ale type",
"beerType": "ale",
"manufacturer": {
"id": 1,
"name": "estrella",
"nationality": "spanish"
}
}'
curl --request GET \
--url http://localhost:8080/api/beer/8
In this method the param name is optional
curl --request GET \
--url 'http://localhost:8080/api/beer/all?name=&page=0&size=5' \
--header 'Content-Type: application/json' \
curl --request PUT \
--url http://localhost:8080/api/beer \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"name": "estrella",
"graduation": 0.8,
"description": "beer ale type",
"beerType": "ale",
"manufacturer": {
"id": 1,
"name": "estrella",
"nationality": "spanish"
}
}'
curl --request DELETE \
--url http://localhost:8080/api/beer/3