[英]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)假设我使用 JHipster 生成: - 1 个网关(使用 MongoDB + JHipsterRegistry) - 3 个微服务 [称为 A、B 和 C](使用 MongoDB + JHipsterRegistry)
I'm using maven.我正在使用 Maven。
I've composed all in Docker, so the resulting Docker configuration is:我已经在 Docker 中编写了所有内容,因此生成的 Docker 配置是:
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.现在我需要在网关(UI 页面等)上实现一些功能,并且我需要在开发过程中使用 Eclipse 进行调试。
How can I achieve this?我怎样才能做到这一点?
A) Do I need to run all manually, so running: A)我是否需要手动全部运行,所以运行:
B) Or can I use somehow docker for all "static" components and run only the Gateway from eclipse? B) 或者我可以以某种方式对所有“静态”组件使用 docker 并且只从 eclipse 运行网关?
C) Any other suggestion? C) 还有其他建议吗?
If (A):如果一个):
If (B):如果(B):
I did something similar as follows, duplicate your docker-compose
directory我做了如下类似的事情,复制你的
docker-compose
目录
create docker-compose-dev
创建
docker-compose-dev
edit the new docker-compose.yml
remove the gateway service编辑新
docker-compose.yml
删除网关服务
edit your hosts file create an entry as follows:编辑您的主机文件,创建一个条目,如下所示:
127.0.0.1 jhipster-registry
run this setup docker compose up -d
运行此设置
docker compose up -d
It should start without issues then you can run your gateway它应该开始没有问题然后你可以运行你的网关
from the command line terminals using mvnw
and npm start
从命令行终端使用
mvnw
和npm start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.