This commit is contained in:
Roberto Röseling Badô 2018-04-12 14:41:56 +00:00 committed by GitHub
commit 8b18fa8338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 116 deletions

4
.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
[submodule "aurea-central-jervis"]
path = aurea-central-jervis
url = git@github.com:trilogy-group/aurea-central-jervis.git
branch = master

43
.jervis.yml Normal file
View file

@ -0,0 +1,43 @@
#######################
# 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
git:
submodules: true
branches:
only:
- master
- develop
- release/*
- hotfix/*
- feature/*
cache:
directories:
- ${HOME}/.m2
jenkins:
stash:
artifacts: target/*
collect:
artifacts: target/*
services:
petclinc:
docker_login:
username: electricflow
password: "!vault |
$ANSIBLE_VAULT;1.1;AES256
34373161303764653863383637376231393862643634646535666232636635386437353163363934
3866303939316462313939303230323534313238323832340a666637366338333033643733303038
66633263616462323766323364663835376438666663616566643739373936633964346565613363
3264653436303761350a613565663463386139303131393035663332653336393362366266316139
3034"
docker_image:
path: .
name: registry2.swarm.devfactory.com/aurea/central/jervis/petclinic

View file

@ -1,2 +0,0 @@
language: java
jdk: oraclejdk8

1
aurea-central-jervis Submodule

@ -0,0 +1 @@
Subproject commit fef2605a4ef9d39c6273537347a93e7266ef877d

122
readme.md
View file

@ -1,120 +1,16 @@
# 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/)
# Aurea Central Jervis Examples
## Understanding the Spring Petclinic application with a few diagrams
<a href="https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application">See the presentation here</a>
## Based on the original Spring's PetClinic
<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
cd spring-petclinic
./mvnw spring-boot:run
git clone https://github.com/trilogy-group/your-project-repository.git
cd your-project-repository
```
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">
## 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:
### 2. Add Aurea Central Jervis repository as submodule
```
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