Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.78 KB

File metadata and controls

26 lines (19 loc) · 1.78 KB

#Overview

This application provides the task related functionality and serves as one component. It defines the REST endpoints that are used to provide task functionality.

This micro-service also provides an example of to call another OAuth2 protected service from within this service using OAuth2 client configuration. The OAuth2 bearer token that has been passed to the task service is propagated to the "comments" service to get the comments for the given task.

##Pre-requisites

Projects that need to be started before

  • config server - For pulling the configuration information
  • webserver-registry - For starting the Eureka server since the authorization server also is a micro-service that needs to be registered with Eureka server.

Running the application

  • Build the application by running the ./gradlew clean build gradle command at the "task-webservice" project root folder on the terminal.
  • If you want to run the application as jar file, then run java -jar build/libs/basic-task-webservice-0.0.1.jar command at the terminal.

External Configuration

Please refer to user webservice for details on how the external configuration works. Note that there is separate configuration file for each Spring application; the application should refer to it's own .yml file for configuration.

Consumer Driven Contracts

  • The task service has tests that validate the contract defined by the comments webservice.
  • The comments-webservice publishes the stubs to the local maven repository which is then used by the task-webservice to validate the contract.
  • To run the contract test, run the following gradle task
./gradlew clean build