mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Initial changes to integrate with jervis
This commit is contained in:
parent
932f17ddae
commit
cf016b54e8
4 changed files with 70 additions and 114 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "aurea-central-jervis"]
|
||||||
|
path = aurea-central-jervis
|
||||||
|
url = git@github.com:trilogy-group/aurea-central-jervis.git
|
56
.jervis.yml
Normal file
56
.jervis.yml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
#######################
|
||||||
|
# Aurea Central Jervis Example
|
||||||
|
#######################
|
||||||
|
# User guide and documentation can be found at: https://github.com/trilogy-group/aurea-central-jervis-example
|
||||||
|
# This project is based on https://github.com/aurea-central-jervis-example/aurea-central-jervis
|
||||||
|
|
||||||
|
language: java
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- DOCKER_IMAGE_BASE_URL=registry2.swarm.devfactory.com/aurea/central/jervis/petclinic
|
||||||
|
- DOCKER_HOST=tcp://dlb1.aureacentral.com:2375
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- docker build -t ${DOCKER_IMAGE_BASE_URL}:${GIT_COMMIT}
|
||||||
|
|
||||||
|
jenkins:
|
||||||
|
pipeline_jenkinsfile: aurea-central-jervis/pipelines/SaaS
|
||||||
|
|
||||||
|
inventories:
|
||||||
|
dev:
|
||||||
|
- ../inventories/dev
|
||||||
|
regression:
|
||||||
|
- ../inventories/regression
|
||||||
|
qa:
|
||||||
|
- ../inventories/qa
|
||||||
|
staging:
|
||||||
|
- ../inventories/staging
|
||||||
|
release:
|
||||||
|
- ../inventories/release
|
||||||
|
|
||||||
|
services:
|
||||||
|
ecn-web:
|
||||||
|
pre-install:
|
||||||
|
- name: Copying deploy files...
|
||||||
|
win_copy:
|
||||||
|
src: '../deploy/'
|
||||||
|
dest: 'C:/deploy'
|
||||||
|
- name: Preparing environment...
|
||||||
|
win_shell: "./setup-environment.ps1"
|
||||||
|
args:
|
||||||
|
chdir: C:/deploy/EnvironmentSetup
|
||||||
|
- name: Preparing installation...
|
||||||
|
win_shell: "./download-components.ps1"
|
||||||
|
args:
|
||||||
|
chdir: C:/deploy/PreInstall
|
||||||
|
install:
|
||||||
|
- name: Installing components...
|
||||||
|
win_shell: "./setup-components.ps1"
|
||||||
|
args:
|
||||||
|
chdir: C:/deploy/Install
|
||||||
|
post-install:
|
||||||
|
- name: Configuring components...
|
||||||
|
win_shell: "./apply-qasetup.ps1"
|
||||||
|
args:
|
||||||
|
chdir: C:/deploy/PostInstall
|
1
aurea-central-jervis
Submodule
1
aurea-central-jervis
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 65111f861414939695179ba04bc074363be3e440
|
122
readme.md
122
readme.md
|
@ -1,120 +1,16 @@
|
||||||
# Spring PetClinic Sample Application [](https://travis-ci.org/spring-projects/spring-petclinic/)
|
# Aurea Central Jervis Examples
|
||||||
|
|
||||||
## Understanding the Spring Petclinic application with a few diagrams
|
## Based on the original Spring's PetClinic
|
||||||
<a href="https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application">See the presentation here</a>
|
<a href="https://github.com/spring-projects/spring-petclinic">See original project here</a>
|
||||||
|
|
||||||
## Running petclinic locally
|
## Getting started with Central Jervis
|
||||||
|
### 1. Clone the repository you will integrate Central Jervis with
|
||||||
```
|
```
|
||||||
git clone https://github.com/spring-projects/spring-petclinic.git
|
git clone https://github.com/trilogy-group/your-project-repository.git
|
||||||
cd spring-petclinic
|
cd your-project-repository
|
||||||
./mvnw spring-boot:run
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then access petclinic here: http://localhost:8080/
|
### 2. Add Aurea Central Jervis repository as submodule
|
||||||
|
|
||||||
<img width="1042" alt="petclinic-screenshot" src="https://cloud.githubusercontent.com/assets/838318/19727082/2aee6d6c-9b8e-11e6-81fe-e889a5ddfded.png">
|
|
||||||
|
|
||||||
## 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
|
|
||||||
|
|
||||||
|
|
||||||
## 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 data-access.properties file needs to be updated and the mysql-connector-java artifact from the pom.xml needs to be uncommented.
|
|
||||||
|
|
||||||
You could start a MySql database with docker:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8
|
git submodule add git@github.com:trilogy-group/aurea-central-jervis.git
|
||||||
```
|
```
|
||||||
|
|
||||||
## Working with Petclinic in Eclipse/STS
|
|
||||||
|
|
||||||
### prerequisites
|
|
||||||
The following items should be installed in your system:
|
|
||||||
* Apache Maven (https://maven.apache.org/install.html)
|
|
||||||
* git command line tool (https://help.github.com/articles/set-up-git)
|
|
||||||
* Eclipse with the m2e plugin (m2e is installed by default when using the STS (http://www.springsource.org/sts) distribution of Eclipse)
|
|
||||||
|
|
||||||
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: http://www.eclipse.org/m2e/m2e-downloads.html
|
|
||||||
|
|
||||||
|
|
||||||
### Steps:
|
|
||||||
|
|
||||||
1) In the command line
|
|
||||||
```
|
|
||||||
git clone https://github.com/spring-projects/spring-petclinic.git
|
|
||||||
```
|
|
||||||
2) Inside Eclipse
|
|
||||||
```
|
|
||||||
File -> Import -> Maven -> Existing Maven project
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## 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 | [CacheConfig](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/java/org/springframework/samples/petclinic/system/CacheConfig.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 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.
|
|
||||||
|
|
||||||
| Link | Main technologies |
|
|
||||||
|------------------------------------|-------------------|
|
|
||||||
| [spring-framework-petclinic][] | Spring Framework XML configuration, JSP pages, 3 persistence layers: JDBC, JPA and Spring Data JPA |
|
|
||||||
| [javaconfig branch][] | Same frameworks as the [spring-framework-petclinic][] but with Java Configuration instead of XML |
|
|
||||||
| [spring-petclinic-angularjs][] | AngularJS 1.x, Spring Boot and Spring Data JPA |
|
|
||||||
| [spring-petclinic-angular][] | Angular 4 front-end of the Petclinic REST API [spring-petclinic-rest][] |
|
|
||||||
| [spring-petclinic-microservices][] | Distributed version of Spring Petclinic built with Spring Cloud |
|
|
||||||
| [spring-petclinic-reactjs][] | ReactJS (with TypeScript) and Spring Boot |
|
|
||||||
| [spring-petclinic-graphql][] | GraphQL version based on React Appolo, TypeScript and GraphQL Spring boot starter |
|
|
||||||
| [spring-petclinic-kotlin][] | Kotlin version of [spring-petclinic][] |
|
|
||||||
| [spring-petclinic-rest][] | Backend REST API |
|
|
||||||
|
|
||||||
|
|
||||||
## 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) |
|
|
||||||
|
|
||||||
|
|
||||||
# Contributing
|
|
||||||
|
|
||||||
The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, features requests and submitting pull requests.
|
|
||||||
|
|
||||||
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 <http://editorconfig.org>. If you have not previously done so, please fill out and submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement].
|
|
||||||
|
|
||||||
# License
|
|
||||||
|
|
||||||
The Spring PetClinic sample application is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0).
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
Loading…
Reference in a new issue