Closed cfreyer closed 10 months ago
I experienced this tonight when updating my jhipster8-demo. This has never been a question before when creating monoliths, so it's a regression.
It was added via https://github.com/jhipster/generator-jhipster/pull/24457
Hi there, is anyone working on this ? I will be happy to try and fix it !
@nil-malh If you like go ahead. If you have any question don't hesitate to ask.
Okay gonna work on it today will keep you posted !
@atomfrede Do we agree that the expected behavior is the following ?
Not sure, maybe have it for microservices and gateways, by default it should be false and not shown for monolith. @mshima what do you say? Did I miss something such that we want feign clients for monolith too?
Not sure, maybe have it for microservices and gateways, by default it should be false and not shown for monolith. @mshima what do you say? Did I miss something such that we want feign clients for monolith too?
I would assume no, there is an error implemented that will throw if the app is a monolith and asked for a feign client
Fixed in #24566
For what it's worth:
A) I have not seen the feign client option in the past when generating a monolithic application.
B) Technically, if the monolith's API is exposed, a developer could use the feign client when writing another backend. However, I think this goes beyond the expectations of a monolith application.
On Thu, Dec 14, 2023 at 8:11 AM Frederik Hahne @.***> wrote:
Not sure, maybe have it for microservices and gateways, by default it should be false and not shown for monolith. @mshima https://github.com/mshima what do you say? Did I miss something such that we want feign clients for monolith too?
— Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/24560#issuecomment-1855826418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMG63B3KZ7N23CHQ7SSJLYJL3IXAVCNFSM6AAAAABAUD5ENCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJVHAZDMNBRHA . You are receiving this because you authored the thread.Message ID: @.***>
I have not seen this question before when generating a gateway or microservice either. I'm not sure it should be an option for gateways since we only support Spring Cloud Gateway with WebFlux right now, which often uses WebClient instead of OpenFeign.
Spring Cloud Gateway does support Spring MVC now, but I found you can't configure its token relay filter in YAML. It has to be configured in Java. This will be fixed in 2023.0.1.
https://github.com/spring-cloud/spring-cloud-gateway/issues/3176
@mraible what do you advice should I let it for gateways or only for microservices ?
I think it should only be for non-reactive microservices, but I'm not sure as I'm not familiar with when it was included in previous versions of JHipster.
Noted will do it now !
Done #24566
Hi everyone, I think the problem is still not fixed
Overview of the issue
While running
jhipster
to create a new project, a user can choose both a Monolithic application, and a Feign client. After answering remaining questions, project generation fails with the following error:ERROR! An error occured while running jhipster:server#feignMigration ERROR! ERROR! Feign client is only supported by microservice applications.
Motivation for or Use Case
Completing the questions to generate a new app should not lead to a failure situation.
Reproduce the error
install JHipster v8.1.0. Answer questions as follows: What is the base name of your application? something ? Which type of application would you like to create? Monolithic application (recommended for simple projects) ? Do you want to generate a feign client? Yes ? Besides Junit, which testing frameworks would you like to use? Cucumber ? Do you want to make it reactive with Spring WebFlux? No ? What is your default Java package name? com.test ? Which type of authentication would you like to use? JWT authentication (stateless, with a token) ? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) ? Which production database would you like to use? PostgreSQL ? Which development database would you like to use? H2 with in-memory persistence ? Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache! ? Would you like to use Maven or Gradle for building the backend? Maven ? Which other technologies would you like to use? API first development using OpenAPI-generator
Related issues
Suggest a Fix
Bypass feign client question if user selects Monolithic in previous question
JHipster Version(s)
v8.1.0
JHipster configuration
Welcome to JHipster v8.1.0 Welcome to the JHipster Information Sub-Generator
JHipster configuration not found
Environment and Tools
openjdk version "17.0.9" 2023-10-17 OpenJDK Runtime Environment GraalVM CE 17.0.9+9.1 (build 17.0.9+9-jvmci-23.0-b22) OpenJDK 64-Bit Server VM GraalVM CE 17.0.9+9.1 (build 17.0.9+9-jvmci-23.0-b22, mixed mode, sharing)
git version 2.39.2
node: v18.18.2 npm: 10.2.5
Docker version 24.0.7, build afdd53b WARNING! Current location doesn't contain a valid JHipster application
no jdl yet
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryno entity file yet
Browsers and Operating System
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm
Linux pluto 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux