Choosing the IDE for Spring Boot development

Are you diving into Spring Boot development and wondering which IDE is the best fit for your projects? Choosing the right IDE can significantly impact your productivity, code quality, and overall development experience. In this article, we’ll explore some of the top IDEs available for Spring Boot development, comparing their features, ease of use, and suitability for different development scenarios.

Visual Studio (Community Edition)

Visual Studio Community Edition is a free, fully-featured version of Microsoft’s integrated development environment (IDE) called Visual Studio. It provides a comprehensive set of tools and features for building various types of applications, including web, desktop, mobile, cloud, and game development.

Among the large list of extensions, there are several Spring Boot extensions that you can load to improve your productivity. Firstly select “extension” in the left panel and enter “spring boot” in the search filter:

Visual Studio Code for Spring Boot

Spring Initializr is a lightweight extension to quickly generate a Spring Boot project in Visual Studio Code (VS Code). It helps you to customize your projects with configurations and manage Spring Boot dependencies.
Spring Boot Tools is the core extensions for developing project with Visual Studio. It provides several features to improve your productivity such as:

  • Providing support for working with Spring Boot application.properties, application.yml and .java files.
  • Easy navigation to Spring-specific elements of your source code such as Rest Services:

Best IDE for Spring Boot

  • Live application hovers: you can connect to running Spring processes to visualize internal information of those running Spring processes inline with your source code. This allows you to see, for example, which beans have bean created at runtime, how they are wired, and more.

Spring Boot IDE comparison

  • Additional code completions for Spring-specific annotations:

Top Spring Boot development tools

IntelliJ IDEA and Spring Boot

IntelliJ is a great development environment. This IDE is available as Community Edition and as Ultimate Edition. The Ultimate Edition contains a lot of features but it has to be purchased.

There are mainly two plugins that you can add to IntelliJ Idea to manage Spring Boot Projects:

  • The Spring Boot Helper (Paid)
  • The Spring Boot Assistant (built-in with ideaIC-2022.3.1)

You can find them by searching through the Plugins using the “spring boot” Search String. For example:

Choosing the right IDE for Spring Boot

Installing the Spring Boot Helper

The Spring Boot Helper is now a paid plugin. It can assist in Spring application development in many areas, for example:

  • Adds support for Spring Boot Initializr
  • Autocomplete Spring Boot/Cloud configuration key/value
  • Contains Spring reference configuration and Spring metadata documentation.

For example, you can connect directly to the Spring boot Initializr service and create the skeleton of your application without leaving your IDE.

Popular IDEs for Spring Boot projects

Additionally, the Idea Ultimate edition allows to test and debug Spring Boot web applications quite easily.  Methods annotated with @RequestMapping or @GetMapping now have gutter icons that let you use the new REST client to make an HTTP request to the given URI.

IDE recommendations for Spring Boot

Using the Spring Boot Assistant

The Spring Boot Assistant is a free plugin that provides the following benefits:

  1. Auto-completion of the configuration properties in your yaml files based on the spring boot’s autoconfiguration jars are present in the classpath.
  2. Auto-completion of the configuration properties in your yaml files if you have classes annotated with @ConfigurationProperties , if your build is properly configured.
  3. Short form search & search for element deep within is also supported. i.e, sp.d will show you spring.data , spring.datasource, also, port would show server.port as a suggestion.
  4. Quick documentation for groups & properties (not all groups & properties will have documentation, depends on whether the original author specified documentation or not for any given element).

When using the Spring Boot Assistant, you won’t be able to kick start the Spring Boot initializr directly from Idea. However, importing the project into the IDE is trivial.

  1. Unzip the project in a location of your file stystem
  2. From the Menu choose: File | New Project from Existing sources
  3. Choose the Project model, for example Maven project

IntelliJ IDEA for Spring Boot

Your Spring Boot project is now available in IntelliJ idea:

IDE features for Spring Boot development

As you can see, the Spring Boot automatically recognizes the application.yml as configuration file. Additionally, you will be able to receive suggestions/autocomplete with your properties in the editor:

Spring Boot IDE plugins

Spring Tools IDE

Spring Tools 4 is the latest version of the Spring tooling suite. The new version works seamlessly in a variety of coding environments. It has been extensively redesigned to offer superior support for the development of Spring-based enterprise applications in Eclipse, Visual Studio Code, or Theia IDE.

You can use Spring Tools 4 in your preferred coding environment, whether that be a full-featured integrated development environment or a lightweight code editor, and benefit from the advanced Spring tooling it provides.

You can download the Spring Tools 4 full bundle (Your IDE + the plugin) at: https://spring.io/tools

As an alternative, you can download just the plugin for your IDE. For example with Eclipse, reach Help > Eclipse Market Place and install the Plugin:

IDEs with Spring Boot auto-configuration

Whatever option you choose, to create a new Spring Boot application in Spring Tool Suite, select the New > Spring Starter Project menu item from the File menu. When you do, Spring Tool Suite will present you with a dialog box similar to the following picture:

Efficient Spring Boot development with IDEs
Then you can continue by selecting the link to the Initializr service where you will be able to create a template of your application:

Integrated development environments for Spring Boot

When you finish the Project creation wizard, the Spring Boot project will be available in your Workspace. You are now ready to start developing with Spring Boot.

As you develop the application, you’ll find that Spring Tool Suite has some nice specific Spring Boot tricks that will speed your development. For example, you can run your application with an embedded server by selecting Run As > Spring Boot Application from the Run menu.

Important!  The Spring Tool coordinates with the Initializr via a REST API . Therefore, it will only work if you are able to connect to the Initializr. If your machine is offline or the Inizializr is blocked by a firewall, the above procedure won’t work!

Conclusion

In conclusion, selecting the best IDE for Spring Boot development is a crucial decision that can greatly enhance your productivity and coding efficiency. Each IDE has its strengths and features tailored to different developer preferences and project requirements. From the feature-rich IntelliJ IDEA to the versatile Eclipse IDE, the lightweight Visual Studio Code to the Spring-focused Spring Tool Suite (STS), the choice ultimately depends on your specific needs and personal coding style.

Found the article helpful? if so please follow us on Socials
Twitter Icon       Facebook Icon       LinkedIn Icon       Mastodon Icon