配置文件:
notify.domain:
wxpay: https://test.xxx.com.cn
alipay: https://test.xxx.com.cn
@Component
public class WxPayNotifyUrlConstants {
@Value("${notify.domain.wxpay}")
private String domain;
public static String orderUrl;
@PostConstruct
private void init() {
orderUrl = domain + "/order/paySuccess";
}
}
参考文章: