Skip to content

Commit ab1d536

Browse files
committed
Merge pull request #2188 from anirudhasht
* pr/2188: Polish "Fix Java version mismatch and clarify Gradle usage in readme" Fix Java version mismatch and clarify Gradle usage in readme Closes gh-2188
2 parents 987613e + f5b8a89 commit ab1d536

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,31 @@ See the presentation here:
1414
## Run Petclinic locally
1515

1616
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/).
17-
Java 17 or later is required for the build, and the application can run with Java 17 or newer:
17+
Java 17 or later is required for the build, and the application can run with Java 17 or newer.
18+
19+
You first need to clone the project locally:
1820

1921
```bash
2022
git clone https://github.com/spring-projects/spring-petclinic.git
2123
cd spring-petclinic
22-
./mvnw package
23-
java -jar target/*.jar
2424
```
25+
If you are using Maven, you can start the application on the command-line as follows:
26+
27+
```bash
28+
./mvnw spring-boot:run
29+
```
30+
With Gradle, the command is as follows:
2531

26-
(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.)
32+
```bash
33+
./gradlew bootRun
34+
```
2735

2836
You can then access the Petclinic at <http://localhost:8080/>.
2937

3038
<img width="1042" alt="petclinic-screenshot" src="https://cloud.githubusercontent.com/assets/838318/19727082/2aee6d6c-9b8e-11e6-81fe-e889a5ddfded.png">
3139

32-
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):
33-
34-
```bash
35-
./mvnw spring-boot:run
36-
```
37-
38-
> NOTE: If you prefer to use Gradle, you can build the app using `./gradlew build` and look for the jar file in `build/libs`.
40+
You can, of course, run Petclinic in your favorite IDE.
41+
See below for more details.
3942

4043
## Building a Container
4144

@@ -98,7 +101,7 @@ There is a `petclinic.css` in `src/main/resources/static/resources/css`. It was
98101

99102
The following items should be installed in your system:
100103

101-
- Java 25 or newer (full JDK, not a JRE)
104+
- Java 17 or newer (full JDK, not a JRE)
102105
- [Git command line tool](https://help.github.com/articles/set-up-git)
103106
- Your preferred IDE
104107
- Eclipse with the m2e plugin. Note: when m2e is available, there is a m2 icon in `Help -> About` dialog. If m2e is

0 commit comments

Comments
 (0)