- 再类上用 @RefreshScope 更新
- @Value(“${uniqlo.privacy.url:https://wsurl.cc/yourls-api.php}”)
private String shortLinkGenerateUrl;的数据可以实时更新
2.再配置类上次用
@ConfigurationProperties(prefix = “test.privacy”)
和nacos的配置一直
@Data
@Component
@ConfigurationProperties(prefix = "test.privacy")
@RefreshScope
public class PrivacyConfig {
private String signature;
private String h5ShortLinkUrl;
private String receiveCouponUrl;
private String lotteryUrl;
private String endUrl;
}