start-petstore-springboot.py
start-petstore-springboot.py starts the Juneau petstore sample application using Spring Boot's embedded servlet container. It is a convenience launcher equivalent to running mvn spring-boot:run from the petstore-springboot module.
What It Does
The script:
- Locates the project root from its own filesystem position.
- Confirms
juneau-petstore/juneau-petstore-springboot/target/classesexists; if not, runsmvn clean compilefirst. - Invokes
mvn spring-boot:runfrom the petstore-springboot module directory.
Usage
python3 scripts/start-petstore-springboot.py
The petstore boots on http://localhost:5000 by default (configurable via application.properties's server.port or the PORT environment variable).
Useful URLs once running
GET http://localhost:5000/petstore/pets— full pet listing.GET http://localhost:5000/petstore/pets/1— single seeded pet (Mr. Frisky).GET http://localhost:5000/console/store,/console/pets— the petstore admin console;/console/dev/flavors/mustacheshows the Mustache-rendered flavor.GET http://localhost:5000/petstore-ui/static/petstore-ui.html— React SPA demo.GET http://localhost:5000/console/dev/secure— bearer-token demo (secure API calls useAuthorization: Bearer petstore-user).GET http://localhost:5000/petstore— Swagger UI for the petstore API.GET http://localhost:5000/hello— Spring@Autowiredinjection demo (deployment-specific).
Requirements
- Python 3.6 or higher
- Maven (must be on PATH)
- Java 17+
Related
- See juneau-petstore Overview for the application architecture.
- See start-petstore-jetty.py for the Jetty/Microservice variant.