Building Applications with Spring 5 and Kotlin
Building Applications with Spring 5 and Kotlin
Summary:
Introduction
The book "Building Applications with Spring 5 and Kotlin" (2018, 298 pages) by Miloš Vasić is a practical guide that combines two powerful tools of the modern Java ecosystem: the Spring 5 framework and the Kotlin language. Although the book was published several years ago, its content remains relevant for developers who want to master reactive programming, build RESTful services, and implement Spring Boot best practices using Kotlin's concise syntax.
What the book is about
The book systematically guides the reader from project setup basics to deploying a complete application. The main focus is on practical aspects: Spring Boot configuration, working with databases via Spring Data JPA, building REST APIs, implementing asynchronous and reactive streams with WebFlux, as well as testing and security. Each chapter contains ready-to-use Kotlin code examples that can be immediately applied in real projects.
Who this book is for
The publication is aimed at developers already familiar with Java and having a basic understanding of Spring. Knowledge of Kotlin is not required — the author introduces the language's syntax and idioms as needed. The book will be useful both for Java programmers wanting to switch to Kotlin and for those who want to learn modern Spring 5 features, including reactive programming.
What the reader will learn
- Project setup: creating a Spring Boot application with Gradle and Kotlin DSL, configuring beans and profiles.
- Working with data: using Spring Data JPA, repositories, Flyway migrations, transactions.
- REST API: building controllers, error handling, request validation, documentation with Swagger.
- Reactive programming: WebFlux basics, working with Mono and Flux, reactive repositories.
- Security: authentication and authorization with Spring Security, JWT tokens.
- Testing: unit and integration tests with JUnit 5, Mockito, testing reactive components.
- Deployment: packaging into Docker containers, cloud deployment.
Strengths
The main advantage of the book is its practical focus. The author does not overload with theory but immediately shows how to solve specific tasks. Kotlin code is easy to read and concise, allowing for faster material absorption. The chapter on reactive programming deserves special attention: it provides a clear understanding of when and why to use WebFlux instead of the traditional approach. The testing section is also noteworthy — it covers not only standard scenarios but also writing tests for reactive streams.
Who it is recommended for
The book will be useful for Java developers who want to learn Kotlin in the context of Spring, as well as for those already working with Kotlin but wanting to deepen their knowledge of Spring 5. It is suitable for intermediate level: from those who confidently write in Java and want to expand their technology stack, to those looking for a practical introduction to reactive programming. Beginners in Spring or Kotlin may need additional literature on the basics.