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.
- Spring Boot.
- HibernateORM.
- H2 Datastore.
- HATEOAS. (Hypermedia as the Engine of Application State).
- JsonDoc..
- Fiegn.
- OKHTTP.
- Gradle
- 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.
- 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.
- 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.
- 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.
- Validations missing.
- Not written fulfledged unit tests.
- gradle build - Not generating proper service jar.
- .bat has to be modify manually prior to run.