From 430b5ff41d2d477c62a3890c33e716f4a1b3062e Mon Sep 17 00:00:00 2001 From: anirudhasht Date: Thu, 1 Jan 2026 16:54:45 +0530 Subject: [PATCH 1/2] Fix Java version mismatch and clarify Gradle usage in readme See gh-2188 Signed-off-by: anirudhasht --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 95618d59f..5b8eb036b 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,15 @@ Or you can run it from Maven directly using the Spring Boot Maven plugin. If you ./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 in `build/libs`. +> +> You can also run the application directly using Gradle: +> +> ```bash +> ./gradlew bootRun +> ``` + ## Building a Container @@ -98,7 +106,7 @@ There is a `petclinic.css` in `src/main/resources/static/resources/css`. It was The following items should be installed in your system: -- Java 25 or newer (full JDK, not a JRE) +- Java 17 or newer (LTS recommended, full JDK required) - [Git command line tool](https://help.github.com/articles/set-up-git) - Your preferred IDE - Eclipse with the m2e plugin. Note: when m2e is available, there is a m2 icon in `Help -> About` dialog. If m2e is From f5b8a8945194f271384dd7132f4be03d984c42e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Fri, 2 Jan 2026 08:11:31 +0100 Subject: [PATCH 2/2] Polish "Fix Java version mismatch and clarify Gradle usage in readme" See gh-2188 --- README.md | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 5b8eb036b..e8aa6f3d8 100644 --- a/README.md +++ b/README.md @@ -14,36 +14,31 @@ See the presentation here: ## Run Petclinic locally Spring Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/) or [Gradle](https://spring.io/guides/gs/gradle/). -Java 17 or later is required for the build, and the application can run with Java 17 or newer: +Java 17 or later is required for the build, and the application can run with Java 17 or newer. + +You first need to clone the project locally: ```bash git clone https://github.com/spring-projects/spring-petclinic.git cd spring-petclinic -./mvnw package -java -jar target/*.jar ``` +If you are using Maven, you can start the application on the command-line as follows: -(On Windows, or if your shell doesn't expand the glob, you might need to specify the JAR file name explicitly on the command line at the end there.) +```bash +./mvnw spring-boot:run +``` +With Gradle, the command is as follows: + +```bash +./gradlew bootRun +``` You can then access the Petclinic at . petclinic-screenshot -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): - -```bash -./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 in `build/libs`. -> -> You can also run the application directly using Gradle: -> -> ```bash -> ./gradlew bootRun -> ``` - +You can, of course, run Petclinic in your favorite IDE. +See below for more details. ## Building a Container @@ -106,7 +101,7 @@ There is a `petclinic.css` in `src/main/resources/static/resources/css`. It was The following items should be installed in your system: -- Java 17 or newer (LTS recommended, full JDK required) +- Java 17 or newer (full JDK, not a JRE) - [Git command line tool](https://help.github.com/articles/set-up-git) - Your preferred IDE - Eclipse with the m2e plugin. Note: when m2e is available, there is a m2 icon in `Help -> About` dialog. If m2e is