IntelliJ IDEA : Running multiple project (Microservices) in one workspace

Teten Nugraha
Backend Habit
Published in
3 min readFeb 13, 2020

I will share tips based on my experience in building system which use microservices architecture using Spring Based.

First, before I know this tips, I always do coding with multiple windows on Intellj IDEA like this.

Let say, I have 5 services, so open Intellij IDEA 5 times. And I think this way is not effective. So, Im looking for a way to make it effective.

Lets Rock …

Let say I have 6 six services :

  • Registry Service
  • Config Service
  • Zuul Service
  • Book Service
  • Log Service
  • Email Service

Step 1

Create new empty project by choosing menu File -> New -> Project and popup menu will appear, and you must choose Empty Project like this.

step 1

Step 2

Fill Project Name and Project Location. click Finish and then open this project.

step 2
workspace

Step 3

the next step are input one by one service into this workspace with these step.

Press menu File -> New -> Module from Existing Source and you choose let say you want to input registry service.

Module from Existing Source

Import Module will appear, you must choose Import module from external model and choose Maven (because my project is based on maven as build tools).

import module

and other popup will appear to set abou maven configuration and then click Next Button.

second popup

Select Profiles : Nexus

and leave it as default and click Finish.

Repeat the steps until all of your project go into workspace. and then running all projects.

if on Intellij IDEa appear popup like this in the bottom right, you must click Show Run configurations in Services.

and look in the bottom left, there is section to inform you which services are running.

monitoring services

if you successfully following these step, it look like this.

If it was interesting or helpful to you, please do press the 👏 clap button and help others find this story too or if you wanna talk internally with me , reach me in https://linktr.ee/teten_nugraha.

--

--

Teten Nugraha
Backend Habit

Software Engineer, 8 years of experience. Expertise with Microservices, Spring Boot, CICD, Docker https://www.linkedin.com/in/teten-nugraha