Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bdac92b
gitpod config
svenefftinge Sep 10, 2019
0c5aed0
exclude project files
svenefftinge Nov 1, 2019
6cd36b8
Updated readme
foobar421 Dec 4, 2019
292d48a
updated badge
svenefftinge Feb 1, 2020
c5f06bd
removed mandatory
svenefftinge Aug 21, 2020
f3aa31f
Update .gitpod.yml
svenefftinge Nov 10, 2020
5841e89
[config] add java extension
svenefftinge Mar 3, 2021
5e19430
[gitpod] update gitpod config
svenefftinge Mar 31, 2021
d8a88ba
Merge pull request #42 from gitpod-io/se/gitpod-config
svenefftinge Mar 31, 2021
2c63795
Update readme.md
svenefftinge Apr 25, 2021
e73a1d1
Make firstname mandatory
svenefftinge Apr 25, 2021
68d992e
Merge pull request #44 from gitpod-io/sefftinge/make-first-name-optio…
svenefftinge Apr 25, 2021
3c51e92
Update .gitpod.yml
KengoTODA Aug 24, 2021
ab00ab9
jb config
akosyakov Feb 3, 2022
bee128d
check in idea configs
akosyakov Feb 10, 2022
97051b8
configure JB backend indexing in prebuild
akosyakov Feb 24, 2022
4cf676d
add headless check
akosyakov Feb 24, 2022
d02d76e
explicitly specify SDK target
akosyakov Feb 24, 2022
8361302
read intellij versino from gitpod-io repo
akosyakov Feb 25, 2022
accbfdb
Merge pull request #55 from akosyakov/master
akosyakov Mar 2, 2022
7a2e911
remove IntellIJ warm up task
akosyakov Mar 10, 2022
54e0c17
fix .gitpod.yml
akosyakov Mar 10, 2022
f1031ae
enable jb indexing in prebuilds
akosyakov Apr 1, 2022
01f86bc
add jb repo plugins
akosyakov Apr 15, 2022
8d8a9f0
[gitpod] name run petclinic app task
akosyakov Apr 21, 2022
9895697
idea warm-up in prebuilds
akosyakov Apr 26, 2022
a4ecc15
Modify README
Nancy-Chauhan Jun 2, 2022
3009c15
Update readme.md
svenefftinge Jul 26, 2022
f1d7c04
Merge pull request #51 from KengoTODA/patch-1
svenefftinge Jul 27, 2022
5edeacc
use java 17
svenefftinge Jul 27, 2022
da399f7
Merge pull request #63 from gitpod-io/java17
svenefftinge Jul 27, 2022
6d556c7
updated vscode extension
svenefftinge Jul 27, 2022
0615c1b
Merge pull request #64 from gitpod-io/extension-test
svenefftinge Jul 27, 2022
e4a0308
Merge pull request #62 from gitpod-io/modify-documentation
svenefftinge Jul 27, 2022
7929b02
Update readme.md
svenefftinge Jul 27, 2022
f933cf1
update idea config
svenefftinge Jul 27, 2022
b5a6c1a
fix: referrer URLs for Gitpod Badge
Siddhant-K-code Jul 27, 2022
c08fce8
removing custom image
svenefftinge Aug 4, 2022
f55e8a2
Fix the detection of this project as a Maven module (#66)
felladrin Sep 14, 2022
0822167
Leave only the required files in the `.idea` folder and update the Ru…
felladrin Oct 5, 2022
d6267b2
Remove bogus docker-compose.yml
atduarte Oct 8, 2022
e2abf71
nit docs fix
Siddhant-K-code Nov 15, 2022
d7b27c9
Use the auto-generated .idea directory (#71)
felladrin Nov 24, 2022
942dbd1
Contribute the gitpod-demos fixes to spring-petclinic back to gitpod-…
jankeromnes Jun 27, 2023
7e1eb31
readd warmup
jeanp413 Sep 6, 2023
7f7e7ce
Merge pull request #73 from gitpod-samples/jp/odd-kite
jeanp413 Sep 8, 2023
87e7828
Enable prebuild only for stable
jeanp413 Sep 11, 2023
b84fc2c
Enable prebuilds for stable and latest
jeanp413 Sep 15, 2023
e767e07
Bump org.webjars:bootstrap from 3.3.6 to 3.4.1
dependabot[bot] Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ target/*
.project
.factorypath
.attach_pid*
.idea
*.iml
/target
.sts4-cache/
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
_site/
22 changes: 22 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image: gitpod/workspace-full

tasks:
- init: ./mvnw clean install -U -DskipTests
command: ./mvnw spring-boot:run
name: Run PetClinic app

ports:
- port: 8080
onOpen: open-preview

vscode:
extensions:
- pivotal.vscode-spring-boot
- vscjava.vscode-java-pack

jetbrains:
intellij:
plugins:
- com.haulmont.jpab
prebuilds:
version: both
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/jpa-buddy.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/runConfigurations/PetClinicApplication.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "interactive",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
}
}
9 changes: 0 additions & 9 deletions docker-compose.yml

This file was deleted.

5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Web dependencies -->
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
<webjars-bootstrap.version>3.4.1</webjars-bootstrap.version>
<webjars-jquery-ui.version>1.11.4</webjars-jquery-ui.version>
<webjars-jquery.version>2.2.4</webjars-jquery.version>
<wro4j.version>1.8.0</wro4j.version>

<jacoco.version>0.8.2</jacoco.version>

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

</properties>

<dependencies>
Expand Down
141 changes: 22 additions & 119 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,140 +1,43 @@
# Spring PetClinic Sample Application [![Build Status](https://travis-ci.org/spring-projects/spring-petclinic.png?branch=master)](https://travis-ci.org/spring-projects/spring-petclinic/)
Deploy this sample application to Pivotal Web Services:
## Spring PetClinic Sample application [![setup automated](https://img.shields.io/badge/Gitpod-ready_to_code-orange?logo=gitpod)](https://gitpod.io/#https://github.com/gitpod-io/spring-petclinic)

<a href="https://push-to.cfapps.io?repo=https%3A%2F%2Fgithub.com%2Fspring-projects%2Fspring-petclinic.git">
<img src="https://push-to.cfapps.io/ui/assets/images/Push-to-Pivotal-Light-with-Shadow.svg" width="180" alt="Push" align="center">
</a>

## Understanding the Spring Petclinic application with a few diagrams
<a href="https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application">See the presentation here</a>

## Running petclinic locally
Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/). You can build a jar file and run it from the command line:
[Petclinic](https://github.com/spring-projects/spring-petclinic) is a [Spring Boot](https://spring.io/guides/gs/spring-boot/) application built using [Maven](https://spring.io/guides/gs/maven/).

## Table of Contents

```
git clone https://github.com/spring-projects/spring-petclinic.git
cd spring-petclinic
./mvnw package
java -jar target/*.jar
```

You can then access petclinic here: http://localhost:8080/
- [Run petclinic on Gitpod](#run-petclinic-on-gitpod)
- [Get Started With Your Own Project](#get-started-with-your-own-project)
- [Community support](#community-support)

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

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):
Start coding in a [ready-to-code, cloud development environment](https://www.gitpod.io)

```
./mvnw spring-boot:run
```
Setup Gitpod integration with Jetbrains Gateway using the instructions given in this [doc](https://www.gitpod.io/docs/ides-and-editors/intellij).

## 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
Click the button below to start a new workspace on Gitpod which will automatically open the workspace in IntelliJ IDEA through JetBrains Gateway.


## Database configuration

In its default configuration, Petclinic uses an in-memory database (HSQLDB) which
gets populated at startup with data. A similar setup is provided for MySql in case a persistent database configuration is needed.
Note that whenever the database type is changed, the app needs to be run with a different profile: `spring.profiles.active=mysql` for MySql.

You could start MySql locally with whatever installer works for your OS, or with docker:

```
docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8
```

Further documentation is provided [here](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt).

## Working with Petclinic in your IDE
<a href="https://gitpod.io/#https://github.com/gitpod-io/spring-petclinic" style="padding: 10px;">
<img src="https://gitpod.io/button/open-in-gitpod.svg" width="150" alt="Push" align="center">
</a>

### Prerequisites
The following items should be installed in your system:
* Java 8 or newer.
* 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 an m2 icon in `Help -> About` dialog. If m2e is
not there, just follow the install process here: https://www.eclipse.org/m2e/
* [Spring Tools Suite](https://spring.io/tools) (STS)
* IntelliJ IDEA
* [VS Code](https://code.visualstudio.com)

### Steps:
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):

1) On the command line
```
git clone https://github.com/spring-projects/spring-petclinic.git
```
2) Inside Eclipse or STS
```
File -> Import -> Maven -> Existing Maven project
./mvnw spring-boot:run
```

Then either build on the command line `./mvnw generate-resources` or using the Eclipse launcher (right click on project and `Run As -> Maven install`) to generate the css. Run the application main method by right clicking on it and choosing `Run As -> Java Application`.

3) Inside IntelliJ IDEA

In the main menu, choose `File -> Open` and select the Petclinic [pom.xml](pom.xml). Click on the `Open` button.

CSS files are generated from the Maven build. You can either build them on the command line `./mvnw generate-resources`
or right click on the `spring-petclinic` project then `Maven -> Generates sources and Update Folders`.

A run configuration named `PetClinicApplication` should have been created for you if you're using a recent Ultimate
version. Otherwise, run the application by right clicking on the `PetClinicApplication` main class and choosing
`Run 'PetClinicApplication'`.

4) Navigate to Petclinic

Visit [http://localhost:8080](http://localhost:8080) in your browser.


## Looking for something in particular?

|Spring Boot Configuration | Class or Java property files |
|--------------------------|---|
|The Main Class | [PetClinicApplication](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java) |
|Properties Files | [application.properties](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/resources) |
|Caching | [CacheConfiguration](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/java/org/springframework/samples/petclinic/system/CacheConfiguration.java) |

## Interesting Spring Petclinic branches and forks

The Spring Petclinic master branch in the main [spring-projects](https://github.com/spring-projects/spring-petclinic)
GitHub org is the "canonical" implementation, currently based on Spring Boot and Thymeleaf. There are
[quite a few forks](https://spring-petclinic.github.io/docs/forks.html) in a special GitHub org
[spring-petclinic](https://github.com/spring-petclinic). If you have a special interest in a different technology stack
that could be used to implement the Pet Clinic then please join the community there.


## Interaction with other open source projects

One of the best parts about working on the Spring Petclinic application is that we have the opportunity to work in direct contact with many Open Source projects. We found some bugs/suggested improvements on various topics such as Spring, Spring Data, Bean Validation and even Eclipse! In many cases, they've been fixed/implemented in just a few days.
Here is a list of them:

| Name | Issue |
|------|-------|
| Spring JDBC: simplify usage of NamedParameterJdbcTemplate | [SPR-10256](https://jira.springsource.org/browse/SPR-10256) and [SPR-10257](https://jira.springsource.org/browse/SPR-10257) |
| Bean Validation / Hibernate Validator: simplify Maven dependencies and backward compatibility |[HV-790](https://hibernate.atlassian.net/browse/HV-790) and [HV-792](https://hibernate.atlassian.net/browse/HV-792) |
| Spring Data: provide more flexibility when working with JPQL queries | [DATAJPA-292](https://jira.springsource.org/browse/DATAJPA-292) |

## Get Started With Your Own Project

# Contributing
To get started with Spring Boot on Gitpod, add a [`.gitpod.yml`](./.gitpod.yml) file which contains the configuration to improve the developer experience on Gitpod. To learn more, please see the [Getting Started](https://www.gitpod.io/docs/getting-started) documentation.

The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, features requests and submitting pull requests.
## Community Support

For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org>. If you have not previously done so, please fill out and submit the [Contributor License Agreement](https://cla.pivotal.io/sign/spring).
For any help refer to [Gitpod documentation](https://gitpod.io/workspaces). If you have any additonal questions, you can use one of these channels:

# License
[![Discord](https://img.shields.io/discord/816244985187008514?color=7289da&logo=Discord&style=for-the-badge)](https://discord.com/channels/816244985187008514/903225840660279296)

The Spring PetClinic sample application is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).
[![GitHub issues](https://img.shields.io/github/issues/gitpod-io/template-java-spring-boot-gradle?logo=Github&style=for-the-badge)](https://github.com/gitpod-io/spring-petclinic/issues)

[spring-petclinic]: https://github.com/spring-projects/spring-petclinic
[spring-framework-petclinic]: https://github.com/spring-petclinic/spring-framework-petclinic
[spring-petclinic-angularjs]: https://github.com/spring-petclinic/spring-petclinic-angularjs
[javaconfig branch]: https://github.com/spring-petclinic/spring-framework-petclinic/tree/javaconfig
[spring-petclinic-angular]: https://github.com/spring-petclinic/spring-petclinic-angular
[spring-petclinic-microservices]: https://github.com/spring-petclinic/spring-petclinic-microservices
[spring-petclinic-reactjs]: https://github.com/spring-petclinic/spring-petclinic-reactjs
[spring-petclinic-graphql]: https://github.com/spring-petclinic/spring-petclinic-graphql
[spring-petclinic-kotlin]: https://github.com/spring-petclinic/spring-petclinic-kotlin
[spring-petclinic-rest]: https://github.com/spring-petclinic/spring-petclinic-rest
[![Twitter Follow](https://img.shields.io/twitter/follow/gitpod?label=Gitpod&logo=twitter&style=for-the-badge)](https://twitter.com/gitpod)