Skip to content

Sample Rest service developed using Spring Boot, HateOAS, HibernateORM and JSONDOC.

Notifications You must be signed in to change notification settings

lovababu/SpringBootExample

Repository files navigation

SpringBootExample

Sample Service developed using Spring Boot, Hibernate ORM, H2 inMemory datastore to demonstrate the microservice architecture.
Added HATEOAS feature.
Added support for user interactive documentation using Jsondoc api.

#Tech Stack.

  1. Spring Boot.
  2. HibernateORM.
  3. H2 Datastore.
  4. HATEOAS. (Hypermedia as the Engine of Application State).
  5. JsonDoc..
  6. Fiegn.
  7. OKHTTP.
  8. Gradle
  9. Cucumber

#Prerequisites. JDK 7 or above.
Gradle (for installation refer https://docs.gradle.org/current/userguide/installation.html) #How to Import into IDE?

Used gradle build tool as dependency management, build and packaging. Go to the cloned/downloaded directory and run the below task.

  1. For eclipse lovers.

gradlew eclipse

The above task generates two new files .eclipse and .project under root directory. Now you should be able import the project.

  1. For direct running from command tool window.

gradlew bootRun

This task builds the application and start up the server on default port no 8080, you can change it through application.properties have a look.

  1. For packaging to deliver.

gradlew bootRepackage OR >gradlew clean build bootRepackage

After successful ./microservicedemo-service/build/distributions/microsericedemo-service-.zip file can be found. To run this directly unzip it you can find ./bin/microservicedemo-service.bat directory to start the server, befor run it do below modification for only windows users.

Replace entire CLASSPATH setting with the "set CLASSPATH=%APP_HOME%\conf;%APP_HOME%\lib*;" . Since windows has limitation in classpath setting. This is bug in gradle https://issues.gradle.org/browse/GRADLE-2992 .

#How to access documentation?

http://localhost:8080/jsondoc-ui.html and paste the url http://localhost:8080/jsondoc in the text box and click on GetDocumentation button.

#Known Issues and Limitation.

  1. Validations missing.
  2. Not written fulfledged unit tests.
  3. gradle build - Not generating proper service jar.
  4. .bat has to be modify manually prior to run.

About

Sample Rest service developed using Spring Boot, HateOAS, HibernateORM and JSONDOC.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published