IntelliJ IDEA 2017.2: Spring Boot Improvements
Endpoints Tab
The Run/Debug tool windows for Spring Boot applications now contain an Endpoints tab which will include information retrieved from the application’s actuator endpoints Beans, Health, and Mapping. ‘spring-boot-starter-actuator’ must be added as a dependency to the application to enable these endpoints. The Spring Boot Run/Debug configuration option ‘Enable JMX agent’ must be also enabled in order to make new Endpoints tab appear.
Initializr
For Gradle-based projects: issues with automatic setup for have been fixed, and a run configuration can now be created automatically as well (see Application Settings below).
Configuration Files
Support for custom configuration files is now available. To define a custom spring.config.name, select the Spring Boot fileset under Facets (in the Project Structure) and open the customization dialog via toolbar button:
You can also add (additional) configuration files via “+” button. Any bootstrap.* files that are found are always added automatically.
Completion for configuration keys has been improved: keys referring to types not on the classpath (e.g. database specific keys) are shown at the bottom of the completion list,, “local” keys defined in additional-config.json are at the top.
In Spring Boot 1.5, an additional “level” (warning/error) for denoting deprecation status of configuration keys was added. This is now fully supported in IntelliJ IDEA and highlighted accordingly in configuration files and documentation.
Auto-Configuration
Detected auto-configuration classes are now sorted according to @AutoConfigureOrder
and @AutoConfigureAfter
|Before
. For @ConditionalOnProperty
the actual configuration key values will now be evaluated so IntelliJ IDEA will be able to more correctly evaluate autoconfigured Spring Beans in the code.
Banner Files
If you have a custom banner file that doesn’t have the standard banner.txt name and your configuration includes the banner.location setting, it is fully recognised and will offer code highlighting and completion.
Application Settings
Finally, the Spring Boot application settings are easier to find. They’ve been grouped together under a new Spring Boot section in Languages and Frameworks. As mentioned earlier, now the “Create Run Configuration automatically” setting applies to Gradle as well as Maven.
ArthurManz says:
August 24, 2017Is the spring boot configuration properties location also working with yaml format? I am facing problems!
Yann Cébron says:
August 25, 2017YAML file format does not have same level of support as .properties files. Could you please file a bug with some sample in our issue tracker? https://youtrack.jetbrains.com/issues/IDEA. Thank You.
Dominik Sienkiewicz says:
September 4, 2017When spring boot dev tools will be supported?
Not experimental.
Yann Cébron says:
October 16, 2017Please watch/vote for https://youtrack.jetbrains.com/issue/IDEA-141638
Ben says:
October 13, 2017Any chance someone can address or at least provide an update on: https://youtrack.jetbrains.com/issue/IDEA-107048
It’s impossible to run Spring Boot apps that are packaged as deployable wars (without silly workarounds). It’s open for over 4 years and no response for over 2. This functionality works fine in the free Spring Tool Suite…
Georgii says:
November 1, 2017This custom configuration file doesn’t work for me … I did just new new project using spring initializr.
SREENIVASULU GUDURU says:
December 3, 2018I’m using 2017.3.4 (Ulitmate Edition)
The bootstrap.properties file is not automatically detected as a configuration file with when I create a new project using Spring Initializt.
The documentation above: “Any bootstrap.* files that are found are always added automatically.” is basically not working for me
Konstantin Aleev says:
December 5, 2018Hello, Sreenivasulu! Starting from 2017.3 Intellij IDEA detects bootstrap.* files automatically only if project has a dependency on spring-cloud-context which is actually responsible for creating bootstrap context. Does your new project depend on it?