Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Building Applications with Spring 5 and Kotlin
Building Applications with Spring 5 and Kotlin

Building Applications with Spring 5 and Kotlin: Build scalable and reactive applications with Spring combined with the productivity of Kotlin

eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Building Applications with Spring 5 and Kotlin

Starting with Spring

In the previous chapter, we set up our development environment. We are now ready to create our first Spring code written in Kotlin. To do that, we will get familiar with Spring background and explain what exactly Spring can do. When we introduce you to Spring background, we will kick off the project! Get ready!

In this chapter, we will learn the following:

  • What is Spring?
  • Spring's most important features
  • Kotlin support for Spring
  • Generating projects
  • Creating Spring project in IntelliJ

What is Spring?

The Spring Framework is a framework developed by the Pivotal company. The framework offers to end the user's programming and configuration model for modern enterprise applications. Spring Framework is made for developers to be able to focus on application-level business logic. Today almost all modern enterprise applications are developed by using Spring Framework. That makes it one of the most widely used and popular development frameworks available.

What features does it offer?

Spring Framework comes with plenty of modern features every developer needs. Here, we will highlight the most important ones and say a few words about them.

...

Creating Spring project

The time has come to create our first Spring code and run it. We will, of course, use Kotlin as our primary development language. For project initialization, we will use Spring Initializr.

What is Spring Initializr?

In one sentence, Spring Initializr is a web-based quick start generator for Spring Framework projects. You can access it online at the following URL:

https://start.spring.io/

And from it's GitHub repository, https://github.com/spring-io/initializr, since it's open an source project.

Spring Initializr provides API to generate quick start Spring Framework projects. You can use the default instance hosted on the spring.io domain or clone the GitHub repository and host your own instance...

Creating Spring project with IntelliJ

To close this chapter, we will demonstrate how to initialize the project from IntelliJ Idea. We will get pretty much the same result as with Initializr. Start IntelliJ and select the Create new project option. A New Project dialog box appears, as shown in the following screenshot:

Set your project options, and then select the Spring Framework components as shown in the following screenshot:

Also, select Kotlin/JVM as the language we will use, as shown in the following screenshot:

Follow the wizard until the project is ready. You will be asked to enable annotations, as shown in the following screenshot. Please do so!

In the following screenshot, you have probably noticed that there is no Spring 5 available as an option, so we will stick to Initializr project initialization since it supports everything we want:

...

Summary

In this chapter, we introduced you to Spring Framework and its features. We kicked off our first project and successfully performed building and execution. In the next chapter, we will continue our journey and do some more concrete work. We will create our first RESTful service with the controller, data class, and service components.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Build a full-fledged application in Spring and Kotlin
  • Architect your application to take a microservice-based approach in the cloud
  • Integrate your application with a variety of Spring components

Description

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.

Who is this book for?

Developers comfortable using Spring who have basic knowledge of Kotlin and want to take their development skills to the next level and build enterprise-grade applications will benefit from this book.

What you will learn

  • Explore Spring 5 concepts with Kotlin
  • Learn both dependency injections and complex configurations
  • Utilize Spring Data, Spring Cloud, and Spring Security in your applications
  • Create efficient reactive systems with Project Reactor
  • Write unit tests for your Spring/Kotlin applications
  • Deploy applications on cloud platforms like AWS

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 18, 2018
Length: 310 pages
Edition : 1st
Language : English
ISBN-13 : 9781788394802
Vendor :
Pivotal
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 18, 2018
Length: 310 pages
Edition : 1st
Language : English
ISBN-13 : 9781788394802
Vendor :
Pivotal
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 110.97
Hands-On Design Patterns with Kotlin
€36.99
Building Applications with Spring 5 and Kotlin
€36.99
Hands-On Microservices with  Kotlin
€36.99
Total 110.97 Stars icon
Banner background image

Table of Contents

11 Chapters
Starting Up Chevron down icon Chevron up icon
Starting with Spring Chevron down icon Chevron up icon
Building Your First Spring RESTful Service with Kotlin Chevron down icon Chevron up icon
Working with Spring Data JPA and MySQL Chevron down icon Chevron up icon
Securing Applications with Spring Security Chevron down icon Chevron up icon
Spring Cloud Chevron down icon Chevron up icon
Using Project Reactor Chevron down icon Chevron up icon
Development Practices Chevron down icon Chevron up icon
Testing Chevron down icon Chevron up icon
Project Deployment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(1 Ratings)
5 star 0%
4 star 0%
3 star 100%
2 star 0%
1 star 0%
Nevyn Jul 12, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
If you are an absolute beginner who requires screenshots, then this book is for you. The only con for you then is that the writer is very brief in explaining things that for a beginner requires a deeper description.As for me (not a beginner). I paged through 15% of the book to get to the end of installing the tools you need. After that the next chapter described what Spring Framework is. MVC was explained on 3 pages, one for each component and even then only a small paragraph each. In all the chapter is like a bullet list of features which would be far too cryptic for a beginner. 20% of the book gets you nowhere.At that point I requested a refund.Why?The book seems like something rushed to be a first to cover the combined topics. The software covered are milestone and release candidates, except for Kotlin which is a major version behind. Why not wait for things to be released and then have an up to date and comprehensive book?I also get the feeling that the author was targeting the topic not out of in-depth knowledge of the components, but more due to it being a hot topic and having some exposure to the components.That's just my opinion.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.