Open Anthem

MODULE 4

AN INSIGHT TO PETCLININC APPLICATION

Introduction

This module helps you to play around with the Petclinic Application

Audience

Programmers who have successfully set up the development environment for NIMBUS framework and gone through the basic examples.

Pre-requisites

The developers are expected to have all the softwares mentioned below installed on their system

Application Name Version

Java

1.8.0_171

Maven

3.5.3

Lombok

1.18.2

STS

3.9.5 RELEASE

VS Code

1.14.2

Robo 3T

1.2.1

Chrome

Version 63.0.3239.108 (Official Build) (64-bit)

Advanced Rest Client

arc-12.1.4

Note
Above s/w versions are compatible with Nimbus f/w version 2.0.x. The versions are subjected to change.

Cloning Nimbus Framework Code

take the latest nimbus odss code from github:

  1. Go to https://github.com/openanthem/nimbus-core and select Branch as 2.0.x.

    cl1
  2. Click the Clone or Download button

    cl1
  3. Copy the hyperlink https://github.com/openanthem/nimbus-core.git

    cl1
  4. Open Terminal

  5. Create any new folder in your Desktop. Here, we have created a new folder named nimbus_code

    cl1
  6. Navigate to the folder

    cl1
  7. Run the following command

    git clone -b 2.0.x
    https://github.com/openanthem/nimbus-core.git
    
    cl1
  8. Navigate to nimbus-core folder which resides in your new folder

    cl1
  9. Build the projects by typing the command

    sh build-projects.sh 
    cl1
  10. You can see a "##Finished building" message

    cl1
  11. We are done cloning the framework code in our local folder

Cloning Pet-Clinic Code

  1. Go to: https://github.com/openanthem/petclinic-training

    P11
  2. Click Clone or Download button

    P11
  3. Copy the hyperlink https://github.com/openanthem/petclinic-training.git

    P12
  4. Open Terminal and create a new folder

    P11
  5. Navigate to the folder path

    P11
  6. Run the following command

    git clone -b 2.0.x https://github.com/openanthem/petclinic-training.git
    P13
  7. Terminal displays successful message

  8. Import the petclinic-training project in STS

    PT2
  9. You can see that the following folders are imported

    PT2
    PT4
  10. Build the projects

    PT4
    PT4
  11. Make sure your mongo db is running. Go to Terminal and run the command

    brew services list
    PT4
  12. Run nimbus-ui .Go to Terminal. Navigate to nimbus_code/nimbus-core/nimbus-ui/nimbusui and run the command

    npm start
    PT4
  13. You can see the compiled successfully message.

    PT4
  14. Now, open STS

    1. Run cloud-config as a spring boot application

      PT5
      PT5
    2. Run petclinic-gateway as a spring boot application

      PT5
    3. Run petclinic-web as a spring boot application

      PT5
  15. Select the application as

    PT6
  16. Launch the app by visting http://localhost:8080/petclinic#/h/petclinicdashboard/vpDashboard

    PT7

Playing around with Pet-Clinic App:

Adding a new Owner:

  1. Launch the app by visiting http://localhost:8080/petclinic#/h/petclinicdashboard/vpDashboard

    O1
  2. Click Owners

    O2
  3. You will be redirected to Owners page. Ente first name and last name and Click Add Owner

    O3
    1. You will be redirected to Add Owners page

      O3a
    2. Enter the details and Click Submit

      O5
    3. You can view the details in Owners page

      O6

Conclusion:

Now you know got to know how to work with the pet-clinic application!