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.54k stars 4.02k forks source link

Gateway microservice with MySQL creates an unsupported non-reactive gateway app #17092

Closed henry2man closed 2 years ago

henry2man commented 2 years ago

Describe the bug Using Jhipster online (https://start.jhipster.tech/generate-application) to generate a new Gateway App with MySQL generates a non-reactive app that doesn't starts due to a missing configuration error related with Spring Cloud Gateway. As per https://github.com/jhipster/generator-jhipster/issues/15933#issuecomment-897700281 (\cc @mraible) all gateways must be reactive ones.

Only for reference, the app throws this error:

Description:

Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found.

Action:

Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' in your configuration.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://start.jhipster.tech/generate-application
  2. Select "Microservice Gateway" in Application Type
  3. Select MySQL as Production database (not sure if this is a must)
  4. Download the project as ZIP
  5. Uncompress and run "./mvnw". The error is thrown and a non-reactive gateway is generated.

Expected behavior The gateway is a reactive app and starts normally.

Screenshots N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context N/A

pascalgrimaud commented 2 years ago

@henry2man: thanks for reporting this. I transfered this ticket to this repository, to give better visibility.

JHipster Online is not well maintained, unfortunately as there is no reactive option in front page. Same thing for Gateway, which is not reactive.

I'm adding a bounty on this, if someone is motivated to fix it.

mshima commented 2 years ago

I thought this was fixed already, it's pretty trivial. Will create the PR.

henry2man commented 2 years ago

JHipster Online is not well maintained, unfortunately as there is no reactive option in front page. Same thing for Gateway, which is not reactive.

I thought you would be completely aligned with JHipster, my apologies.

@pascalgrimaud I propose an idea: What if JHipster Online was a hybrid between the current part that allows generating projects in GitHub or in ZIP but that, when defining the properties of the project, did so by directly launching the jhipster command in a simulated shell console?

In this way, even if it were something more manual, this type of issue would virtually not exist and the most up-to-date options would always be available in the web version. It would not even be difficult to allow the user to choose which version of JHipster to run.

With this approach JHipster Online will be self-updated automatically, making (now mandatory) tasks like "jhipster-online is updated if necessary" in PRs almost unnecesary.

pascalgrimaud commented 2 years ago

yes it should be aligned but I think we forgot some options / features, when improving generator-jhipster

Maintaining the front is not difficult, it's just the main front page to update. The backend uses real generator-jhipster so it should be the same.

I don't think adding a shell console would be used a lot. We already have this -> https://github.com/jhipster/jhipster-guides and it's not used a lot. People will prefer to install generator-jhipster and play it locally.

mshima commented 2 years ago

Once we have a file with option like we have in modular, it should be easier to link jhipster-online. https://github.com/jhipster/generator-jhipster/blob/main/generators/java/options.cjs

In meantime would be nice and probably not difficult to implement a jdl alternative.

mshima commented 9 months ago

@DanielFran bounty claimed https://opencollective.com/generator-jhipster/expenses/180798

DanielFran commented 9 months ago

@mshima approved