plant-name-parser-service - parse and provide structured view for plant names in string representation
In this project ANTLR v4 was used to implement name parser.
Run configurations for IntelliJ Idea are here: ./runConfigurations
You can find here: ./docs
And in swagger: http://localhost:8080/swagger-ui.html
health check : http://localhost:8080/actuator/health
build info : http://localhost:8080/actuator/info
also, Spring Boot Actuator can be configured with additional reports
Example request
POST http://localhost:8080/api/v1/parse
Content-Type: application/json
{
"text": "betula pendula"
}
Example response
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
Date: Wed, 10 Aug 2022 12:58:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
{
"genus": {
"text": "betula"
},
"species": {
"text": "pendula"
},
"subspecies": null,
"alternative": null,
"variety": null,
"cultivar": null,
"form": null
}
Error response
HTTP/1.1 500
Content-Length: 0
Date: Wed, 10 Aug 2022 13:00:35 GMT
Connection: close
<Response body is empty>
Build artifact
docker build --build-arg APPLICATION_VERSION="v1.0.0" -t plant-name-parser-service:v1.0.0 .
Run artifact
docker run -i -t --rm --name plant-name-parser-service -p 8080:8080 \
--memory=1G --cpus=1 \
plant-name-parser-service:v1.0.0
# Adjust system requirements
docker run -i -t --rm --name plant-name-parser-service -p 8080:8080 \
--memory=2G --cpus=1 \
-e JAVA_OPTS="-Xms2G -Xmx2G -server" \
plant-name-parser-service:v1.0.0
PORT - default 8080
API_DOCS_ENABLED - enable api-docs, default true
MANAGEMENT_ENDPOINT_HEALTH - enable management health endpoint, default false
MANAGEMENT_ENDPOINT_INFO - enable management info endpoint, default false