JHipster – How to debug in Eclipse only one gateway (or microservice) in a microservices architecture?

Assuming that with JHipster I’ve generated:
– 1 Gateway (with MongoDB + JHipsterRegistry)
– 3 Microservices [called A, B and C] (with MongoDB + JHipsterRegistry)

I’m using maven.

I’ve composed all in Docker, so the resulting Docker configuration is:

  • 1 JHipster Registry
  • 1 Gateway
  • 1 Gateway MongoDB
  • 1 Microservice A
  • 1 Microservice A MongoDB
  • 1 Microservice B
  • 1 Microservice B MongoDB
  • 1 Microservice C
  • 1 Microservice C MongoDB

All works fine: from the Gateway I can see entities from each Microservice.

Now I need to implement some features on Gateway (UI pages etc), and I need to debug with Eclipse during development.

How can I achieve this?

A) Do I need to run all manually, so running:

  • all components manually with ./mvnw
  • the JHipsterRegistry from a .jar
  • the Gateway from Eclipse running the debugger executing the main Application

B) Or can I use somehow docker for all “static” components and run only the Gateway from eclipse?

C) Any other suggestion?

If (A):

  • I need to start also all MongoDB manually?
  • How?
  • May the used ports collide?
  • Do I need to change configurations?

If (B):

  • How to run all “static” components in docker?
  • How to configure the Gateway to reach other components?

Source: StackOverflow