Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring 5.0 By Example

You're reading from   Spring 5.0 By Example Grasp the fundamentals of Spring 5.0 to build modern, robust, and scalable Java applications

Arrow left icon
Product type Paperback
Published in Feb 2018
Publisher Packt
ISBN-13 9781788624398
Length 356 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Claudio Eduardo de Oliveira Claudio Eduardo de Oliveira
Author Profile Icon Claudio Eduardo de Oliveira
Claudio Eduardo de Oliveira
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Journey to the Spring World FREE CHAPTER 2. Starting in the Spring World – the CMS Application 3. Persistence with Spring Data and Reactive Fashion 4. Kotlin Basics and Spring Data Redis 5. Reactive Web Clients 6. Playing with Server-Sent Events 7. Airline Ticket System 8. Circuit Breakers and Security 9. Putting It All Together 10. Other Books You May Enjoy

Enabling Twitter in our application


In this section, we will enable the use of Twitter APIs on our Twitter Gathering application. This application should get Tweets based on the query specified by the user. This query was registered on the previous microservice that we created in the previous chapter.

When the user calls the API to register TrackedHashTag, the microservice will store the TrackedHashTag on the Redis database and send the message through the RabbitMQ. Then, this project will start to gather Tweets based on that. This is the data flow. In the next chapter, we will do a reactive stream and dispatch Tweets through our Reactive API. It will be amazing.

However, for now, we need to configure the Twitter credentials; we will do that using Spring beans – let's implement it.

Producing Twitter credentials

We will use the @Configuration class to provide our Twitter configuration objects. The @Configuration class is really good to provide infrastructure beans, if we do not have starter projects...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image