Building Applications with Spring 5 and Kotlin
上QQ阅读APP看书,第一时间看更新

Installing Spring 5

Before installing or running Spring 5, we need to install Kotlin, since this is our primary programming language for the project:

  1. Open IntelliJ IDEA and choose Configure | Plugins, as shown in the following screenshot:
  1. In the search field, type Kotlin:
  1. Click on the Install JetBrains plugin... button.

 

  1. From the list that appears, choose Kotlin.
  2. If you do not already have Kotlin installed, you will see a green Install button. Click on it, otherwise click on the Update button, as shown in the following screenshot:
  1. Wait until the installation or update process completes:
  1. When the installation is finished, click on the Restart IntelliJ IDEA button:

If the Restart IntelliJ IDEA button does not restart your IDE, do it yourself manually.

Your IDE is ready for development. It is time to finally set up Spring 5! You can use Spring in the same way as any standard Java library. Simply include the appropriate Spring library files in your classpath. Spring does not require any special tool integration, so you can use any IDE or text editor! As you already know, we will stick to IntelliJ IDEA. You can run and debug Spring applications as you would any other Java application.

Spring can be used through Maven or Gradle. It is up to you to choose which suits you better. We will use Gradle in our development but we will give examples of Maven too.