It's a simple url shortening microservice which take urls and shorten it back using springboot and PGSQL.
First configure the environment with proper value the required values are in env
file
(can use IntelliJ plugins to autoconfig the env by renaming it to .env)
we are just adding basic auth for now. The username password can be configured from env.
USER=user
PASSWORD=password
BASE_URL
is for configuring the base url of the shortened url similar to https://bit.ly
SWAGGER_BASE_URLS
is for keeping the swagger server url for swagger ui to call the API.
After running the application we can open http://localhost:8082 to see the swagger doc for the rest API. (port may change based on environment value)
JobRunner Dashboard will start at http://localhost:8000/dashboard
DELAY_IN_MIN
can be used to config the crone delay.
There is no database caching is added now.
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Data JPA
- Spring Boot DevTools
- Spring Web
- Spring Security
- Flyway Migration
The following guides illustrate how to use some features concretely: