Creating the gather service

The TweetGatherService will be responsible for interacting with Twitter APIs and collecting the request tweets according to the requested hashtag. The service will be a Spring bean with some inject attributes. The class should look like this:

package springfive.twittergathering.domain.serviceimport com.fasterxml.jackson.annotation.JsonIgnorePropertiesimport com.fasterxml.jackson.annotation.JsonPropertyimport org.springframework.http.MediaTypeimport org.springframework.stereotype.Serviceimport org.springframework.web.reactive.function.BodyInsertersimport org.springframework.web.reactive.function.client.WebClientimport reactor.core.publisher.Fluximport springfive.twittergathering.infra.twitter.Twitterimport springfive.twittergathering.infra.twitter.TwitterAppSettings ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.