The URL shortening service is used to shorten long URLs. There may be requirement when we want to avoid sending very long urls to the user via SMS, Whatsapp etc, this service compresses the URL.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Prior Knowledge of Java/J2EE
Prior Knowledge of SpringBoot
Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.
Compress long URLs.
Converted short URLs contains id, which is used by this service to identify and get longer URLs.
Environment Variable
Description
host.name
Host name to append in short URL
db.persistance.enabled
The boolean flag to store the short URL in database when flag is set as TRUE.
Deploy latest version of URL Shortening service
Receive long urls and converts them to shorter urls. Shortened urls contains urls to endpoint mentioned next. When user clicks on shortened URL, user is redirected to long URL.
This shortened urls contains path to this endpoint. The service uses id used in last endpoint to get long URL. As response the user is redirected to long URL.
Title
Link
Swagger API Contract
Local Setup
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.