Skip to content
Snippets Groups Projects
README.md 7.84 KiB

Distributed version of the Spring PetClinic Sample Application built with Spring Cloud Build Status

This microservices branch was initially derived from AngularJS version to demonstrate how to split sample Spring application into microservices. To achieve that goal we used Spring Cloud Netflix technology stack.

Starting services locally

Every microservice is a Spring Boot application and can be started locally using IDE or mvn spring-boot:run command. Please note that supporting services (Config and Discovery Server) must be started before any other application (Customers, Vets, Visits and API). Tracing server startup is optional. If everything goes well, you can access the following services at given location:

Understanding the Spring Petclinic application with a few diagrams

See the presentation here

You can then access petclinic here: http://localhost:8080/

springboot-petclinic

In case you find a bug/suggested improvement for Spring Petclinic

Our issue tracker is available here: https://github.com/spring-petclinic/spring-petclinic-microservices/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 may start a MySql database with docker:

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

Working with Petclinic in Eclipse/STS

prerequisites

The following items should be installed in your system:

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://eclipse.org/m2e/download/