This project is the template for the creation of projects. This project also will contain solutions for blocking issues.
The Demo extends the Common project. The code of the project Demo is in the package urlshortener2014.demo
. It defines the class UrlShortenerControllerWithLogs
that extends the UrlShortenerController
provided by the Core with log support for debugging.
Application
and config
classes configure the Demo application to use UrlShortenerControllerWithLogs
as controller instead of UrlShortenerController
.
The application can be run as follows:
$ gradle run
Gradle will compile project Common and then create a jar
file of it. Next will compile project Demo and run it. Now you have a shortener service running at port 8080 that logs in the console all the requests that you perform.