Book Image

Building Applications with Spring 5 and Kotlin

By : Miloš Vasić
Book Image

Building Applications with Spring 5 and Kotlin

By: Miloš Vasić

Overview of this book

Kotlin is being used widely by developers because of its light weight, built-in null safety, and functional and reactive programming aspects. Kotlin shares the same pragmatic, innovative and opinionated mindset as Spring, so they work well together. Spring when combined with Kotlin helps you to reach a new level of productivity. This combination has helped developers to create Functional Applications using both the tools together. This book will teach you how to take advantage of these developments and build robust, scalable and reactive applications with ease. In this book, you will begin with an introduction to Spring and its setup with Kotlin. You will then dive into assessing the design considerations of your application. Then you will learn to use Spring (with Spring Boot) along with Kotlin to build a robust backend in a microservice architecture with a REST based collaboration, and leverage Project Reactor in your application. You’ll then learn how to integrate Spring Data and Spring Cloud to manage configurations for database interaction and cloud deployment. You’ll also learn to use Spring Security to beef up security of your application before testing it with the JUnit framework and then deploying it on a cloud platform like AWS.
Table of Contents (12 chapters)

Microservices with Spring Cloud

We will consider our API as a piece of a puzzle. Let's say it will be one of the services in the microservice architecture. What we want to achieve is to make it possible to easily work in any distributed environment. Spring Cloud builds on Spring Boot and provides sets of libraries that extend the abilities of our application when added to the classpath.

Spring Cloud provides the following features:

  • Distributed and versioned configuration: Spring Cloud configuration provides server and client-side support for configuration externalization. We define the configuration server as the central place to manage external properties for applications across all environments.
  • Service registration and discovery: We need a way for all of our servers to be able to find each other. Spring Cloud makes this possible and easy to do.
  • Routing and filtering:...