From f31ead5f7953aa0d8096eb4b531d4b442f257322 Mon Sep 17 00:00:00 2001 From: Dave Syer <dsyer@pivotal.io> Date: Mon, 8 Oct 2018 09:05:39 +0100 Subject: [PATCH] Add notes on building a jar See #339 --- readme.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 05bbbe9..25c7d6f 100644 --- a/readme.md +++ b/readme.md @@ -4,16 +4,26 @@ <a href="https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application">See the presentation here</a> ## Running petclinic locally +Petclinic is a https://spring.io/guides/gs/spring-boot[Spring Boot] application built using https://spring.io/guides/gs/maven/[Maven]. You can build a jar file and run it from the command line: + + ``` git clone https://github.com/spring-projects/spring-petclinic.git cd spring-petclinic - ./mvnw spring-boot:run + ./mvnw package + java -jar target/*.jar ``` You can then access petclinic here: http://localhost:8080/ <img width="1042" alt="petclinic-screenshot" src="https://cloud.githubusercontent.com/assets/838318/19727082/2aee6d6c-9b8e-11e6-81fe-e889a5ddfded.png"> +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 +``` + ## In case you find a bug/suggested improvement for Spring Petclinic Our issue tracker is available here: https://github.com/spring-projects/spring-petclinic/issues -- GitLab