Skip to content

splicemachine/spring-petclinic

 
 

Repository files navigation

Splice Machine Spring PetClinic Sample Application

Overview

PetClinic is a Spring application designed to demonstrate the framework's ability to interact with a database. Our fork includes our hibernate dialect and JDBC driver in an effort to demonstrate drop-in communication with Splice Machine as the datastore.

In this fork we have made modifications to utilize:

com.splicemachine.db.jdbc.ClientDriver
com.splicemachine.hibernate.SpliceMachineDialect

Build and Run

Spring Local

You can use the original Spring development server to test the application locally:

./mvnw spring-boot:run

Container Local

To test the container locally you will want to pass the Splice Machine database connection string via the environment:

mvn install -DskipTests
docker build .
[image hash]
docker run -p 8080:8080 --name petclinic -e"DATABASE_HOST=jdbc:splice://docker.for.mac.localhost:1527/splicedb;user=splice;password=admin" [image hash]

Note: The Docker Apple DNS convention docker.for.mac.localhost is used to facilitate communication with the host machine. Local containers will need to access the host machine's copy of Splice Machine.

Container Cloud Push

mvn install -DskipTests
docker build .
[image hash]
docker tag [image hash] splicemachine/petclinic
docker push splicemachine/petclinic

Note: Test skipping is necessary at this point because not all database interactions are implemented.

Run Marathon Application

  • Go to desired Marathon environment
  • Select "Create Application"
  • Use contents of marathon.json to create application
  • Note: You will want to modify $DATABASE_HOST in the marathon application environment to reflect the location of your database.

Inherited Readme

Please see the documentation for the original repo.

About

A sample Spring-based application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 75.5%
  • HTML 13.5%
  • CSS 7.6%
  • TSQL 2.8%
  • Dockerfile 0.3%
  • JavaScript 0.2%
  • Shell 0.1%