-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Hands-On Microservices with Kotlin
By :

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
.
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
to be com.microservices
and Artifact
chapter09
. For D
ep
endencies,
we have set Web
.
Now, we can click on Generate Project
to download it as a ZIP file; after we unzip it, we can open it with IntelliJ IDEA to start working on our project. After some minutes, our project will be...