Search code examples
jhipsterspring-cloud-configjhipster-registry

jHipsterProperties getXXX value not changed when value of spring-cloud-config in jhipster-register xxx was changed


jHipsterProperties getXXX value not changed when value of spring-cloud-config in jhipster-register xxx was changed

java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

git version 2.14.3 (Apple Git-98)

node: v9.4.0

npm: 5.6.0

bower: 1.8.2

gulp: [23:45:31] CLI version 2.0.0

yeoman: 2.0.0

yarn: 1.3.2

Docker version 17.12.0-ce, build c97c6d6

docker-compose version 1.18.0, build 8dd22a9


Solution

  • This is not specific to JHipster, this is how Spring Cloud Config works.

    Unless you use Spring Cloud Bus, it's not automatic you must send a POST request to /management/refresh (JHipster configuration) in your microservice in order to force it to refresh itself and load the new value in. Also, you should check whether this endpoint is configured to require authentication as it is a rather sensitive endpoint.