This is a branch of spring-petclinic-data-jdbc which is itself a branch of the official Spring PetClinic application with domain & persistence layer built with Spring Data YugabyteDB YSQL instead of Spring Data JPA.
Additionally:
- uses Spring Data Yugabyte
- uses Flyway to manage the database schema and initial data loading.
- user SpringFox to deliver Swagger/OpenAPI docs.
More details on Spring Data YugabyteDB.
Check original project readme for introduction the project, how to run, and how to contribute.
-
Create a free tier instance of YugabyteDB Managed.
-
Setup the Yugabyte cloud instance to allow the IP list where the app will be hosted.
-
Download the root certificate of Yugabyte cloud instance and place it in
~/.postgresql
directory.$ mv ~/Downloads/root.crt ~/.postgresql/root.crt
-
Retrieve the Yugabyte Cloud credentials and Configure application.yml
yugabyte: datasource: url: jdbc:postgresql://8bd2c228-de3c-4808-8a99-xxxxxxxxx.cloudportal.yugabyte.com:5433/petclinic?ssl=true&sslmode=verify-full load-balance: true username: admin password:
-
Run the app (go the root of repo):
$ ./mvnw spring-boot:run
Flyway will configure the Yugabyte database with Petclinic Schema and load sample data.