Dynamic update of configuration files

  • There are two ways to obtain a configuration file

    • @Value
    • @ConfigurationProperties(Prefix)
  • If it is to be updated dynamically at run time, cooperate with nacos, when using configuration updates automatically calls nacosNacosContextRefresher, at this time

    • The first way is to add @refreshScope to the bean
    • The second is automatically supported.