Skip to content
Microservices based web service that returns the current time in JSON format, pursuant to timezone input from the user.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
build.gradle

README.md

Time_Web-Service

Microservices based web service that returns the current time in JSON format, pursuant to timezone input from the user.

This project is a microservices-based web service that returns the current time, implemented in Java. Spring Boot is used to create an embedded microservices environment, and Gradle is used as the build tool. This code can be run locally, or deployed to a cloud service such as Amazon Web Services (AWS). Time is returned in JSON format, and returns an informative error in case of incorrect timezone input.

The project requires Java 1.8 and Gradle 4.6 to be installed, and available from the command line. To verify, run the following commands; they should both respond with the current version.

  • $ java -version
  • $ gradle -version

To view available Gradle tasks for the Spring Boot application:

  • $ gradle tasks

To run the standalone Spring Boot application in Gradle:

  • $ gradle bootRun

To generate the full JAR file, and run manually:

  • $ gradle build
  • $ java -jar ./build/libs/sprint-boot-time-web-service.jar

To run the test suite in Gradle, results can be seen in build/reports/tests/test/index.html:

  • $ gradle test

Once the application is running, use a web browser to view the following URLs:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.