The reason is that PropertyPlaceholderConfigurer is used in spring configuration, which makes it impossible to read the configuration in spring cloud config. Add the following configuration to the original PropertyPlaceholderConfigurer configuration to solve:
<property name="ignoreUnresolvablePlaceholders" value="true" />
Reference article: https://blog.csdn.net/javaloveiphone/article/details/58146790