Sandbox repository to showcase creating a discoverable REST API for your application domain model using HAL as media type. Technology stack:
- Spring Boot
- Spring Data Rest
- Spring Data JPA
- Hibernate Validator, which is the reference implementation of [JSR 303/349 - Bean Validation 1.0/1.1 API] (http://beanvalidation.org/1.1/spec/).
Gamified MVP is a RESTful OpenTravel Service Server called Wanderlust. Wanderlust exposes an API that can be used by travelling agents to submit their latest and greatest destinations and holiday package recommendations to Wanderlust. Wanderlust will validate and store only the relevant ones.
Bootstrapping the service locally:
$ git clone https://github.com/cristinanegrean/wanderlust-open-travel-api $ cd wanderlust-open-travel-api $ docker-compose up
where 192.168.99.100 is the IP address of the docker machine. Issue bellow command to find on what IP address you should use:
$ docker-machine ip default
- May you need to run webapp on another port, there are two ways to accomplish: 1) command-line when bootstrapping service: java -Dserver.port=$PORT -jar build/libs/wanderlust-1.0.0-SNAPSHOT.jar --spring.profiles.active=postgres or 2) via application.properties file (inside jar)
- The REST API base path - /api/opentravel - is configurable via changing value of value of key: spring.data.rest.base-path in application.properties
- Database schema DDL will be generated using Flywaydb upon service start. You can check the schema version and list of DB scripts via Spring Actuator endpoint
- Enabling Gradle Daemon will result in faster subsequent project builds.