Search icon CANCEL
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
Hands-On Microservices with  Kotlin

You're reading from   Hands-On Microservices with Kotlin Build reactive and cloud-native microservices with Kotlin using Spring 5 and Spring Boot 2.0

Arrow left icon
Product type Paperback
Published in Jan 2018
Publisher Packt
ISBN-13 9781788471459
Length 414 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Juan Antonio Medina Iglesias Juan Antonio Medina Iglesias
Author Profile Icon Juan Antonio Medina Iglesias
Juan Antonio Medina Iglesias
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Understanding Microservices 2. Getting Started with Spring Boot 2.0 FREE CHAPTER 3. Creating RESTful Services 4. Creating Reactive Microservices 5. Reactive Spring Data 6. Creating Cloud-Native Microservices 7. Creating Dockers 8. Scaling Microservices 9. Testing Spring Microservices 10. Monitoring Microservices 11. Deploying Microservices 12. Best Practices 13. Other Books You May Enjoy

Understanding SpringBootTest

We have learned how easy it is to create microservices using Spring Framework, but now we need to learn how we can test them, and how Spring can help us. First, we will create a small microservice that will later be used for testing. Then, we will understand what is SpringBootTest and how we can test our beans using JUnit. Finally, we will learn how we can test our controller using MockMvc.

Creating a simple microservice

In order to create our microservice, we will use Spring Initializr, as we have been doing in the previous chapters.

We can start by visiting https://start.spring.io/:

Spring Initializr

We have chosen to create a Maven Project using Kotlin and Spring Boot 2.0.0 M7. We choose Group...

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