Skip to main content

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:

  1. Locates the project root from its own filesystem position.
  2. Confirms juneau-petstore/juneau-petstore-springboot/target/classes exists; if not, runs mvn clean compile first.
  3. Invokes mvn spring-boot:run from 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/mustache shows 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 use Authorization: Bearer petstore-user).
  • GET http://localhost:5000/petstore — Swagger UI for the petstore API.
  • GET http://localhost:5000/hello — Spring @Autowired injection demo (deployment-specific).

Requirements​

  • Python 3.6 or higher
  • Maven (must be on PATH)
  • Java 17+