- Navigate to urlshortener directory and execute docker container by running the command "docker-compose up".
This will run the docker-compose.yml which runs a Redis image from docker hub. - Start the server
- Make a http Post request with JSON body containing "url" as key and the url you want shortened as its value.
This will return shortened url. - Now take the shortened url and make a http Get request to the server.
Ex. http://localhost:8080/{shortened_url}
peageon / spring-boot-url-shortener Goto Github PK
View Code? Open in Web Editor NEWUrl Shortener with spring boot and redis