jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

[V8] modify the 'microservice' option behavior #19387

Closed Tcharl closed 8 months ago

Tcharl commented 2 years ago
Overview of the feature request

I propose to modify the jdl's options to have something more clear for the end user in a microservice/gateway configuration.

The thing would be to introduce a new application option: routed and get rid of the microservice option. It also implies an adjustment of the entities option spec.

It would lead to this kind of jdl:

entity A {...}
entity B {...}

application {
  config {
    baseName Gw1
    applicationType gateway
  }
  routed Ms1.A // routed will generate frontend at the Gw level but redirects all the backend calls to microservice
  entities B // will generate frontend and backend at the gateway level
}

application {
  config {
    baseName Ms1
    applicationType microservice
  }
  entities A
}

Note that these options won't handle the only routing and no frontend at the gateway level. A way to handle this use case would be to separate entities option into frontendEntities and backendEntities and let the routed option only in charge of the routing. Still, this change looks too heavy to introduce.

Your thought?

Motivation for or Use Case

The microservice and the entities ... with options' behavior as they are design designed today are quite difficult to grab because they behaves differently depending on their contexts: backend routing if the option is located/targeting a gateway or generated when the context is a ms

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days