How to Set Up Run Configuration for a Java Spring Boot Maven Multimodule Project

How to Set Up Run Configuration for a Java Spring Boot Maven Multimodule Project

This article provides details on how to run a Java Spring Boot Maven multimodule project in IntelliJ. Please refer to the previous article, Maven Multimodule Project - Java Spring Boot, for guidance on creating the project. Let's now add a run configuration for the project created in the last article.

To run the project in IntelliJ using the run configuration, click on the Edit Configuration option in the top right corner of the window.


Click Add New Run Configuration.


Select Application.


1- Name your configuration.

2- Add the JDK

3- Select the submodule for which you want to add the configuration.

4- Select the main class.

5- Add environment variables, if any.

6- Click OK to save your configuration.


Now, you can directly run or debug your app by clicking the buttons next to the run configurations.

Sometimes the IDE is unable to find the main class in the submodule. In that case, try installing your project using the Maven lifecycle command on the right side of the IDE, or try reloading the project and downloading sources.


Or you can right-click on the project's root directory and use these options.



If your IDE or project is unable to detect the JDK, you can specify the path by clicking the IDE settings icon > Project Structure.

In order to prevent your C: drive from filling up, update the local repository path in the project settings. Click the Settings icon in the top right corner > Settings > Build, Execution, Deployment > Build Tools > Maven.

Create a .m2 folder on another drive and specify the path.

You can exclude the tests during installation by selecting this option.

Sometimes, when you restart the IDE or switch branches, IntelliJ does not show the file structure and project source files. In that case, try deleting the ".idea" folder and reopening the project using IntelliJ. You can also use the Invalidate Caches option if there are any issues with indexing or running your project.

You can use Git directly with IntelliJ, as it provides options to perform actions without having to write commands, as well as an embedded terminal to enter commands.

Now you know how to use IntelliJ to run your Maven project. I hope this article was useful.

Abdullah Zahid

Junior Game Developer @ AGS Games | React Native, Android Development

5 个月

Excellent work ????

要查看或添加评论,请登录

Valeena Afzal的更多文章

社区洞察

其他会员也浏览了