spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.97k stars 1.29k forks source link

Spring cloud config server on refresh -> logback config springProperty can not get #2067

Closed FUCKU closed 2 years ago

FUCKU commented 2 years ago

Project configuration is strictly regulated. The common package contains the bootstrap.yml file, which defines the address information for the configServer.

The common package contains the logback-spring.xml file, and other microservices use the same configuration as Common.

The other microservices start normally, and the log gets the spring.application.name correctly, However, when the refresh endpoint is called, the log does not get the correct spring.application.name after the configuration is updated. the log shows that XXX IS UNDEFINED.

To be exact, anything like <springProperty scope="context" ....../> does not get the value correctly.

Is this a bug? Or what exactly am I going to do? I tried several schemes, including changing the logback-spring.xml file to something else and loading it in the application.yml file, but nothing worked. Versions:

2.5.10 2020.0.5 I'm going to give you a demo
spencergibb commented 2 years ago

Refresh and logging are in commons, transferred to https://github.com/spring-cloud/spring-cloud-commons/issues/1083