IntelliJ IDEA 2018.2 Help

Run/Debug Configuration: Spring Boot

Configuration tab

Main class Specify the fully qualified name of the class that will be executed (passed to the JRE).
Environment
VM options

If necessary, specify the command-line options to be passed to the server JVM at the server start.

  • Use spaces to separate options, for example, -client -ea -Xmx1024m.
  • If an option includes spaces, enclose the spaces or the argument itself in double quotes, for example, some" "arg or "some arg".
  • If an option includes double quotes as part of the argument, escape the double quotes using backslashes, for example, -Dmy.prop=\"quoted_value\".
  • You can pass environment variable values to custom Java properties. For example, if you define a variable MY_ENV_VAR, you can pass it to the foo property:
    -Dfoo=${MY_ENV_VAR}
Program arguments Specify arguments to be passed to the program in the format that you use in the command line. Use the same rules as for specifying the VM options.
Working directory If necessary, specify a directory that will be used by the running application. This directory is the starting point for all relative input and output paths. The project directory is specified by default.
Environment variables Click Browse to create variables and specify their values.
Use classpath of module Select the module whose classpath will be used to run the application.
Include dependencies with 'Provided' scopeEnable this option to add dependencies with the Provided scope to the runtime classpath.
JRE By default, the newest JDK from the module dependencies is used to run applications. You can specify an alternative JDK or JRE.
Shorten command line

Select a method that will be used to shorten the command line if the classpath gets too long or you have many VM arguments that exceed your OS command line length limitation:

  • none: IntelliJ IDEA will not shorten a long classpath. If the command line exceeds the OS limitation, IntelliJ IDEA will be unable to run your application and will display a message suggesting you to specify the shortening method.
  • JAR manifest: IntelliJ IDEA will pass a long classpath via a temporary classpath.jar. The original classpath is defined in the manifest file as a class-path attribute in classpath.jar. Note that you will be able to preview the full command line if it was shortened using this method, not just the classpath of the temporary classpath.jar.
  • classpath.file: IntelliJ IDEA will write a long classpath into a text file.
  • User-local default: this legacy option is set automatically for projects created before IntelliJ IDEA version 2017.3. IntelliJ IDEA will configure this setting depending on the properties set in the ide/workspace.xml and idea.config.path/options/options.xml files.
Spring Boot
Enable debug output Enables logging of the debug output by adding the -Ddebug VM option.
Hide banner Hides the Spring Boot startup banner by adding the -Dspring.main.banner-mode=OFF VM option (for Spring Boot 1.4.x and earlier, the option is -Dspring.main.banner=false).
Enable launch optimization Select this option to speed up application launch. The -XX:TieredStopAtLevel=1 and -noverify VM options will be added.
Enable JXM agent

Enables JMX agent that shows application endpoints data by adding the following VM options (requires Spring Boot 1.3.0 or higher):

  • -Dcom.sun.management.jmxremote
  • -Dcom.sun.management.jmxremote.port={random free port} (This argument will not be overwritten if it's already specified in the VM options field.)
  • -Dcom.sun.management.jmxremote.authenticate=false
  • -Dcom.sun.management.jmxremote.ssl=false
  • -Djava.rmi.server.hostname=localhost
  • -DSpring.liveBeansView.mbeanDomain
  • -Dspring.application.admin.enabled=true
On 'Update' action

Specify an action that the IDE will do after you click Update <application name> Application:

  • Update resources — compile all modified and dependent resource files.
  • Update classes and resources — compile all modified and dependent files.
  • Update trigger file — update the trigger file. Set up the trigger file name by adding the -Dspring VM option.
  • Hot swap classes and update trigger file if failed — (available only in the debug mode) compile all modified and dependent files, hot swap classes, update the trigger file if the how swap failed. Specify the trigger file name by adding the
    -Dspring.devtools.restart.trigger-file=.restartTriggerFile VM option.
On frame deactivation

Specify an action that the IDE will do after you switch to another application (other than IntelliJ IDEA):

  • Update resources — compile all modified and dependent resource files.
  • Update classes and resources — compile all modified and dependent files.
Active profiles Specify active Spring profiles that you want to use in this run/debug configuration.
Override parameters Use this table to specify Spring Boot configuration parameters that you want to override. Such parameters are normally defined in configuration files. Listing them in a run/debug configuration allows you to easily switch parameters by modifying the run/debug configuration instead of config files, or have multiple run/debug configurations with different parameter values.

Code Coverage tab

Use this tab to configure code coverage monitoring options.

Choose coverage runner Select the desired code coverage runner.

By default, IntelliJ IDEA uses its own coverage engine with the Sampling mode. You can also choose JaCoCo or Emma for calculating coverage.

SamplingSelect this option to measure code coverage with minimal slow-down.
TracingSelect this option to collect accurate branch coverage. This mode is available for the IntelliJ IDEA code coverage runner only.
Track per test coverageSelect this check box to detect lines covered by one test and all tests covering line.
Packages and classes to record code coverage dataClick icons toolbarDecorator addClass svg and icons toolbarDecorator addFolder svg buttons to specify classes and packages to be measured. You can also remove classes and packages from the list by selecting them in the list and clicking the icons general remove svg button.
Enable coverage in test foldersIf this check box is selected, folders marked as test icons modules testRoot are included in the code coverage analysis.

Logs tab

Use this tab to specify which log files generated while running or debugging must be displayed in the console of the Run/Debug tool window.

Log files to be shown in console In this table, specify a file or a group of files that will be displayed in the Run/Debug tool window.
Save console output to file Save console output to the specified location.
Show console when a message is printed to standard output stream Enable the output console and bring it forward if the associated process is writing to Standard.out.
Show console when a message is printed to standard error stream Enable the output console and bring it forward if the associated process is writing to Standard.err.

Before launch options

Use this section to specify which tasks must be carried out before starting the run/debug session. The tasks you specify will be performed in the order that they appear in the list.

Show this page This option shows the run/debug settings before starting a run/debug session.
Activate tool window Select the checkbox to open the Run/Debug tool window once you run the session.
Last modified: 18 June 2018

See Also