Book Image

Spring Boot 2.0 Projects

By : Mohamed Shazin Sadakath
4 (1)
Book Image

Spring Boot 2.0 Projects

4 (1)
By: Mohamed Shazin Sadakath

Overview of this book

Spring Boot is a lightweight framework that provides a set of tools to create production-grade applications and services. Spring Boot 2.0 Projects is a comprehensive project-based guide for those who are new to Spring, that will get you up to speed with building real-world projects. Complete with clear step-by-step instructions, these easy-to-follow tutorials demonstrate best practices and key insights into building efficient applications with Spring Boot. The book starts off by teaching you how to develop a web application using Spring Boot, followed by giving you an understanding of creating a Spring Boot-based simple blog management system that uses Elasticsearch as the data store. Next, you’ll build a RESTful web services application using Kotlin and the Spring WebFlux framework - a new framework that enables you to create reactive applications in a functional way. Toward the last few chapters, you will build a taxi-hailing API with reactive microservices using Spring Boot, in addition to developing a Twitter clone with the help of a Spring Boot backend. To build on your knowledge further, you’ll also learn how to construct an asynchronous email formatter. By the end of this book, you’ll have a firm foundation in Spring programming and understand how to build powerful, engaging applications in Java using the Spring Boot framework.
Table of Contents (12 chapters)

Chapter 4, Introduction to Kotlin

  1. Yes, variables and expressions can be used inside string literals beginning with a $ sign.
  2. A nullable variable/argument can be assigned null at any point of code. However, before using, defensive code must be used to check for null safety. Kotlin has reduced the chances of NullPointerException using a nullable variable/argument. An example of a nullable variable/argument is var no : Int? = 0, which uses ? at the end of the data type.
  3. Explicit casting in Kotlin is where when a type checking is done using the is a keyword. Within the block of code that follows, there is no need to do a type casting to the destination type. Here is the following code:
var s : Any = "Shazin";
if (s is String) {
// No need to cast s of type Any to type String inside this block of code like java does using ((String) s)
// All properties and functions of String...