jhipster / jhipster-core

JHipster Domain Language, used by JHipster UML and JDL-Studio to generate entities
Apache License 2.0
346 stars 116 forks source link

Underscores in UAA base name are allowed causing problems when running #417

Closed josepaiva94 closed 4 years ago

josepaiva94 commented 4 years ago
Overview of the issue

I'm able to generate a project from a .jh file with a baseName like xxx_uaa for the UAA microservice (or any other microservice). However, the microservices will run with an invalid hostname causing IllegalStateException: Request URI does not contain a valid hostname when contacting it.

Motivation for or Use Case

Well, it hurts to replace all microservices' names after generation. Also, if underscores can't be used for the reason mentioned above, maybe there should exist another way to prefix basenames? Hyphens would be a good candidate (not sure why they were suppressed in the past though).

Reproduce the error
  1. Create a microservice with an underscore in the name
  2. Create another microservice that uses @FeignClient("")
  3. Make a call to the FeignClient
Related issues

https://github.com/jhipster/generator-jhipster/issues/3984

Suggest a Fix
JHipster Version(s)

JHipster v6.5.1

JHipster configuration

openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)

git version 2.20.1

node: v12.13.1

npm: 6.13.4

yeoman: 3.1.1

Docker version 19.03.3, build a872fc2f86

docker-compose version 1.24.1, build 4667896b