Petclinic is a Spring Boot application built using Maven or Gradle. You can build a jar file and run it from the command line (it should work just as well with Java 17 or newer):
git clone https://github.com/spring-projects/spring-petclinic.git
cd spring-petclinic
./mvnw package
java -jar target/*.jar
You can then access petclinic at https://localhost:8080/
Or you can run it from Maven directly using the Spring Boot Maven plugin. If you do this, it will pick up changes that you make in the project immediately (changes to Java source files require a compile as well - most people use an IDE for this):
./mvnw spring-boot:run
NOTE: If you prefer to use Gradle, you can build the app using
./gradlew build
and look for the jar file inbuild/libs
.
There is no Dockerfile
in this project. You can build a container image (if you have a docker daemon) using the Spring Boot build plugin:
./mvnw spring-boot:build-image