Default Environment Variables, and VM options for all new projects in Intellij

Viewed 662

I want to apply common env variables and vm options for all my spring boot applications in Intellij. Whenever i open a new project, the config should copy automatically. Is there a way to do this?

Also , can i use vmoptions file for supplying my default vm arguments ?

1 Answers

No, you cannot use vmoptions for it, that configures the VM options for IntelliJ itself (as IntelliJ is actually written in Java).

Open the templates section in the run configurations dialog.

Templates Menu

Scroll down until you find the run configuration you want to set the defaults for (in this case Sprint Boot).

Spring Boot menu

Click on it, and anything put into the fields will be used for new configurations. Note that it is not possible to retroactively change settings for existing configurations. In this case, what you want is in the Environment dropdown to configure VM options.

Environment dropdown

Manage the configurations, hit OK, and all your new configurations will have those applied to them by default.

Related