Spring Boot Application.properties has no autocomplete suggestions

Viewed 4477

I'm a spring boot beginner I created a sample project using the spring initializer in the application.properties I want to change the server. port but editor doesn't know that doesn't know anything at all what's the problem

3 Answers

Community Edition of InteliJ IDEA doesn't support autocompletion for application.properties. It is ultimate edition feature.

From this support thread

Spring Boot framework is available in the Ultimate edition of IntelliJ IDEA only. It comes as a bundled plugin and is enabled by default.

IntelliJ community edition doesn't support spring boot hence you don't have autocompletion, its an "enterprise" feature (read supported only in the IntelliJ enterprise edition).

All-in-all, there is a special JSON file that IntelliJ can parse (again, only the enterprise edition) and based on the information found in this file it can produce auto-completion for the properties / YAML configuration files.

You can also create such a JSON for your own configuration files by using an annotation processor:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
</dependency>

See this tutorial for example, there are many others. But again, this all works only in the enterprise edition of IntelliJ.

Hello

There is a plugin for IntelliJ IDEA Community Edition which might be very helpful with autocomplete and few more things, here is it's website: Spring Boot Assistant.
You can get the plugin from the link above or directly from the IDE:
  • go to File -> Settings (Ctrl + Alt + S on Windows)
  • search for "Plugins"
  • go to Marketplace
  • search for "Spring Boot Assistant"
  • install it and restart your IDE
  • enjoy autocomplete

Hope it will help you learning, keep working, mate :D

Related