# Spring Boot run configuration

The Spring Boot run configuration defines how to run your Spring Boot application in IntelliJ IDEA. The IDE creates a Spring Boot run configuration when you run the application from the main class file. For more information, refer to [Run a Spring Boot application](spring-boot.html#run-a-spring-boot-application).

Procedure: Create the Spring Boot run configuration

1. In the main menu, go to `Run | Edit Configurations…`.

2. In the Run/Debug Configurations dialog, click ![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) and select Spring Boot.

![The Spring Boot run configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/workspace.xml`.    |

> **Note:**
> The Run on option is available with the IntelliJ IDEA Ultimate subscription.

## Required options

The following options are mandatory to run your Spring Boot application:

| JRE |  Specify the runtime environment that IntelliJ IDEA should use to run the application. By default, IntelliJ IDEA uses the latest available JDK from the module dependencies.  |
| Main class | Specify the fully qualified name of the class to be executed. |

## Modify options

Click Modify options to select additional options for running the configuration.

![Modify options of a Spring Boot run configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/spring_boot_run_config_modify_options.png)

### Spring

The following options are specific to running Spring Boot applications:

| Active profiles |    Specify which Spring profiles should be active.                               This passes `-Dspring.profiles.active` on the command line, which overrides the [spring.profiles.active](https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.core.spring.profiles.active) property.                               For more information, refer to [Spring Boot: Profiles](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.profiles.adding-active-profiles).    |
| Enable debug output |    Enable logging of the debug output.                               This passes `-Ddebug` on the command line, which is similar to setting the [debug](https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.core.debug) property.                               For more information, refer to [Spring Boot: Logging](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.logging.console-output).    |
| Hide banner |    Disable the start-up banner entirely.                               This passes `-Dspring.main.banner-mode=OFF` on the command line, which is similar to setting the [spring.main.banner-mode](https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.core.spring.main.banner-mode) property to `off`.                               For more information, refer to [Spring Boot: Customizing the banner](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.spring-application.banner).    |
| Disable launch optimization |    Do not speed up the start-up time of your application.                               By default, this optimization is enabled by passing the following JVM options on the command line: `-XX:TieredStopAtLevel=1` and `-noverify` (the latter is deprecated in JDK 13 and later versions). This decreases the start-up time of the application at the expense of long-term performance and security. You can keep it enabled for development environments but disable it for production runs.     |
|     Disable JMX endpoints        (Ultimate subscription)      |    Disable the JMX agent that shows the application endpoints data in the Actuator tab of the Run tool window.                              By default, the JMX agent is enabled by passing the following JVM options on the command line:                                * `-Dcom.sun.management.jmxremote`    * `-Dspring.jmx.enabled=true`    * `-DSpring.liveBeansView.mbeanDomain`    * `-Dspring.application.admin.enabled=true`    * `-Dmanagement.endpoints.jmx.exposure.include=*`                               This slows down the application startup. If you disable the JMX agent, the above options will not be added to the command line.                               For more information, refer to [Spring: JMX](https://docs.spring.io/spring-framework/docs/current/reference/html/integration.html#jmx)                              > **Note:** > The Spring Boot endpoints feature is not available by default for Windows users with the FAT file system. To enable it, add `-XX:+PerfBypassFileSystemCheck` to [VM options](#vm-options), and make sure that `%TMP%\hsperfdata_username` has permissions for full folder access.                              > **Note:** > IntelliJ IDEA uses the local JMX connector for retrieving the data of the Spring Boot actuator endpoints. However, it is impossible to get the local JMX connector address if the Spring Boot application and the JVM have different bitness, and you are using OpenJ9 JDK. In this case, add the following options to the [VM options](#vm-options) field: > > > > > > * `-Dcom.sun.management.jmxremote.port={some_port}` > > * `-Dcom.sun.management.jmxremote.authenticate=false` > > * `-Dcom.sun.management.jmxremote.ssl=false` > > > > > > As mentioned in the official [Oracle documentation](https://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html), this configuration is insecure. Any remote user who knows (or guesses) your port number and host name will be able to monitor and control your Java applications and platform.    |
|     On 'Update' action        (Ultimate subscription)      |    Specify what to do when you modify the code and want to update the running application:                                * Do nothing: Do not update the application.    * Update resources: Update all modified resource files.    * Update classes and resources: Update all modified resource files and recompile all changed Java classes. When debugging, IntelliJ IDEA will deploy and reload updated classes. For more information, refer to [Reload modified classes](altering-the-program-s-execution-flow.html#reload_classes). Otherwise, when running the application regularly, IntelliJ IDEA will only update the changed classes in the output folder. Whether it will deploy and reload such classes in the running application depends on the capabilities of the Java runtime that you are using.    * Update trigger file: Pass `-Dspring.devtools.restart.trigger-file=.restartTriggerFile` on the command line and update the `.restartTriggerFile` file, which will initiate a restart check: the application will restart only if there is something to do.    * Hot swap classes and update trigger file if failed: This is similar to [Update classes and resources](#update-classes-and-resources) followed by [Update trigger file](#update-trigger-file).    |
|     On frame deactivation:        (Ultimate subscription)      |    Specify what to do when you switch from IntelliJ IDEA to another application (for example, a web browser):                                * Do nothing: Do not update the application.    * Update resources: Update all modified resource files.    * Update classes and resources: Update all modified resource files and recompile all changed Java classes. When debugging, IntelliJ IDEA will deploy and reload updated classes. For more information, refer to [Reload modified classes](altering-the-program-s-execution-flow.html#reload_classes). Otherwise, when running the application regularly, IntelliJ IDEA will only update the changed classes in the output folder. Whether it will deploy and reload such classes in the running application depends on the capabilities of the Java runtime that you are using.    |
| Override configuration properties |  Override any configuration property by passing it as a JVM option. For example, if you override the value of the `spring.config.name` property with `my.config`, IntelliJ IDEA will pass `-Dspring.config.name=my.config` on the command line when running this Spring Boot application.  |

### Operating System

The following options are related to the operating system:

| Allow multiple instances |  Allow multiple instances of this run configuration to execute at the same time. By default, this option is disabled, which means that when you run the configuration, other active sessions of the configuration will terminate.  |
| Working directory |  Specify the directory that will be used for all relative input and output paths. By default, IntelliJ IDEA uses the project root as the working directory.  |
| Environment variables | Specify the names and values of environment variables that are necessary when running this configuration. |

### Java

The following options are specific to the Java compiler and runtime for your Spring application:

| Do not build before run | Run the application straight away without launching the build process. |
| Use classpath of module | Select the module whose classpath should be used to run the application. |
| Modify classpath |     If necessary, specify another classpath or select dependencies that you want to exclude from the classpath. This option is necessary in cases when the runtime classpath is different from the compile classpath (debug libraries, different locations, and so on).      Use the ![Up](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.moveUp.svg) and ![Down](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.moveDown.svg) buttons to sort dependencies on the list. The order of dependencies is important as IntelliJ IDEA will process them in the same order as they are specified in the list.     |
| VM options |     Specify the options to be passed to the Java virtual machine when launching the application, for example, `-mx`, `-verbose`, and so on.      When specifying JVM options, follow these rules:       * Use spaces to separate individual options.    * If the value of an option includes spaces, enclose either the value or the actual spaces with double quotes.    * If an option includes double quotes as part of the value, escape the double quotes using backslashes.    * You can pass environment variable values to custom Java properties.      ```PLAINTEXT -Xmx1024m -Dspaces="some arg" -Dmy.prop=\"quoted_value\" -Dfoo=${MY_ENV_VAR} ```                          Use code completion in this field: start typing the name of a flag, and the IDE suggests a list of available command line options. This works for `-XX:` and `-X` options and some standard options that are not configured by IntelliJ IDEA automatically, like `-ea`, but not for `-cp` or `–release`.                          The `-classpath` option specified in this field overrides the classpath of the module.    |
| Program arguments | Pass command-line arguments to your application. |
| Add dependencies with “provided” scope to classpath |    Add the dependencies with the `provided` scope to the runtime classpath.                              This option is enabled by default in Spring Boot run configurations.    |
|  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. The choice of option depends on the class loader implementation. Note that some frameworks do not support JAR manifest, while other frameworks with custom class loaders will not work well with the classpath.file option.        * 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 that you 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.    * @argFiles (Java 9+): the command-line length limitations will be overcome using the [@argument files option](https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-4856361B-8BFD-4964-AE84-121F5F6CF111).      > **Note:** > This setting is shared if you select to share your run/debug configuration, so the same method will be applied for your team members irrespective of their operating system.     |

### Logs

The following options are related to logging the execution of this configuration. For more information, refer to [Logs](setting-log-options.html).

| Item | Description |
| --- | --- |
| Specify logs to be shown in the console   |    Specify which log files to display while running the application.                               Click ![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) to add a new log. In the Edit Log Files Aliases dialog, configure the following:                                 * Alias: The name of the tab where the log will be displayed.    * Log File Location: Specify the path to the log file or an [Ant pattern](https://ant.apache.org/manual/dirtasks.html). If several files of a rolling log match the pattern, IntelliJ IDEA will display the most recent one.    * Show all files coverable by pattern: Show all logs that match the pattern.                              For logs in the table, you can configure the following options:                                * Is Active: Display the specified log file.    * Skip Content: Do not display old log messages from previous runs.    |
| Save console output to file   | Save the console output to the specified location. Type the path manually or click the browse button and point to the desired location in the [dialog that opens](null). |
| Show console when a message is printed to stdout   | Activate the console when the application writes to the standard output stream. |
| Show console when a message is printed to stderr   | Activate the console when the application writes to the standard error stream. |

### Code Coverage

The following options are related to code coverage. For more information, refer to [Code coverage](code-coverage.html).

| Item | Description |
| --- | --- |
| Specify classes and packages | In this table, specify classes and packages to be measured. Click ![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) and select ![the Add Class button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.nodes.class.svg) Add Class or ![the Add Package button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.nodes.package.png) Add Package to specify. You can also remove classes and packages from the list by selecting them in the list and clicking the ![remove the package](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.remove.svg) button.  |
| Exclude classes and packages |    Specify classes and packages that you want to exclude from coverage.     Click ![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) and select ![the Add Class button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.nodes.class.svg) Add Class or ![the Add Package button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.nodes.package.png) Add Package to specify classes and packages.    |

### Before Launch

In this area, you can specify tasks to be performed before starting the selected run/debug configuration. The tasks are performed in the order they appear in the list.

| Item | Description |
| --- | --- |
| Add before launch task   | Enable this option to add one of the following available tasks:       * Launch Web Browser: select this option to have a browser started. In the dialog that opens, select the type of the browser and provide the start URL. Also, specify if you want the browser be launched with JavaScript debugger.    * Run External tool: run an external application. In the dialog that opens, select one or multiple applications you want to run. If it is not defined in IntelliJ IDEA yet, add its definition. For more information, refer to [External tools](configuring-third-party-tools.html).    * Run Another Configuration: select to execute another run/debug configuration and wait until it finishes before starting the current configuration. If you want to run several configurations in parallel, use a [compound run/debug configuration](run-debug-multiple.html#compound-configs) .    * Run Remote External Tool: add a [remote SSH external tool](settings-tools-remote-ssh-external-tools.html).    * Run Gradle task: run a [Gradle task](create-run-debug-configuration-gradle-tasks.html). In the dialog that opens, specify the task and provide additional configuration if necessary.    * Build: select to compile the specified module. The [Build Module](compiling-applications.html#compile_module) action will be executed. If an error occurs during compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.    * Build Project: select to compile the entire project. The [Build Project](compiling-applications.html#compile_module) action will be executed. If an error occurs during compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.    * Build, no error check: the same as the Build option, but IntelliJ IDEA will try to start the run/debug configuration irrespective of the compilation results.    * Build Artifacts: select this option to build an [artifact](working-with-artifacts.html) or artifacts. In the dialog that opens, select the artifact or artifacts that should be built.    * Run Maven Goal: select this option to [run a Maven goal](work-with-maven-goals.html). In the dialog that opens, select the goal to be run.    * Run Grunt task: select this option to run a Grunt task. In the Grunt task dialog that opens, specify the `Gruntfile.js` where the required task is defined, select the task to execute, and specify the arguments to pass to the Grunt tool. Specify the location of the Node.js runtime, the parameters to pass to it, and the path to the grunt-cli package.    * Run gulp task: select this option to run a Gulp task. In the Gulp task dialog that opens, specify the `Gulpfile.js` where the required task is defined, select the task to execute, and specify the arguments to pass to the Gulp tool. Specify the location of the Node.js runtime, the parameters to pass to it, and the path to the gulp package.    * Run npm script: select this option to execute an npm script. In the NPM Script dialog that opens, specify the [npm run/debug configuration settings](installing-and-removing-external-software-using-node-package-manager.html).    * Compile TypeScript: select to run the built-in TypeScript compiler and thus make sure that all the changes you made to your TypeScript code are reflected in the generated JavaScript files. In the TypeScript Compile Settings dialog that opens, select or clear the Check errors checkbox to configure the behaviour of the compiler in case any errors are detected: * If the Check errors checkbox is selected, the compiler will show all the errors and the run configuration will not start. * If the Check errors checkbox is cleared, the compiler will show all the detected errors but the run configuration still will be launched.    * Disconnect Data Source: select this option if you want to disrupt the connection to a data source before the run/debug configuration is run.    |
| Open run/debug tool window when started   |  Depending on the type of configuration, open the [Run](run-tool-window.html), [Debug](debug-tool-window.html), or [Services](services-tool-window.html) tool window when you start this run configuration. If this option is disabled, you can open the tool window manually:                                 * `View \| Tool Windows \| Run` or `Alt+4` (Windows), `⌘ 4` (macOS), `⌘ 4` (IntelliJ IDEA Classic (macOS)), `⌘ 4` (macOS System Shortcuts), `Alt+4` (XWin), `Alt+4` (GNOME), `Alt+4` (KDE), `Alt+4` (Emacs), `Alt+4` (Sublime Text), `⌘ 4` (Sublime Text (macOS)), `Alt+4` (NetBeans), `Alt+4` (Visual Studio), `⌘ 4` (Visual Studio (macOS)), `Alt+4` (Eclipse), `⌘ 4` (Eclipse (macOS))    * `View \| Tool Windows \| Debug` or `Alt+5` (Windows), `⌘ 5` (macOS), `⌘ 5` (IntelliJ IDEA Classic (macOS)), `⌘ 5` (macOS System Shortcuts), `Alt+5` (XWin), `Alt+5` (GNOME), `Alt+5` (KDE), `Alt+5` (Emacs), `Alt+5` (Sublime Text), `⌘ 5` (Sublime Text (macOS)), `Alt+5` (NetBeans), `Alt+5` (Visual Studio), `⌘ 5` (Visual Studio (macOS)), `Alt+5` (Eclipse), `⌘ 5` (Eclipse (macOS))    * `View \| Tool Windows \| Services` or `Alt+8` (Windows), `⌘ 8` (macOS), `⌘ 8` (IntelliJ IDEA Classic (macOS)), `⌘ 8` (macOS System Shortcuts), `Alt+8` (XWin), `Alt+8` (GNOME), `Alt+8` (KDE), `Alt+8` (Emacs), `Alt+8` (Sublime Text), `⌘ 8` (Sublime Text (macOS)), `Alt+8` (NetBeans), `Alt+8` (Visual Studio), `Alt+8` (Visual Studio (macOS)), `Alt+8` (Eclipse), `⌘ 8` (Eclipse (macOS))    |
| Focus run/debug tool window when started   | Focus on the run configuration tool window when the tests are running. |
| Show the run/debug configuration settings before start   | Show the run configuration settings before actually starting it. |

