Skip to content

albertoolivan/rest-producer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rest-producer

rest-producer

You can customize the database (H2 by default and for @test) and the initial data in this files:

scr/main/resources/city_list.txt

CityId,CityName
"AMS","Amsterdam"
"ATH","Athens"
...

scr/main/resources/city_distance_list.txt

Id,CityOriginId,CityDestinationId,distance(km)
"AMS1","AMS","LON",494
"AMS2","AMS","BER",649
...
  1. Pre requirement - install rest.dto-1.0.0-SNAPSHOT.jar

https://github.com/albertoolivan/ch.rest.dto.git $ mvn install

  1. Maven install to get rest-producer-1.0.0-SNAPSHOT.jar

$ mvn install

  1. Create a docker image rest-producer

$ docker build -t rest-producer .

  1. Execute docker container

$ docker run -p 8098:8098 rest-producer

  1. Test in browser (need service-registry up)

http://localhost:8098/city/info/MAD http://localhost:8098/city/all http://localhost:8098/city/itinerary-short?cityOriginId=MAD&cityDestinationId=BER&departureTime=2019-07-10T01:30:00.000Z http://localhost:8098/city/itinerary-less?cityOriginId=MAD&cityDestinationId=BER&departureTime=2019-07-10T01:30:00.000Z http://localhost:8098/city-distance?cityOriginId=MAD

user: user_rest password: paSs123_w0rd

  1. Swagger Rest doc

http://localhost:8098/swagger-ui.html

See eureka-dijkstra for more info

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages