package com.atguigu.ssyx.user.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * ClassName: ConstantPropertiesUtil
 * Package: com.atguigu.ssyx.user.utils
 *
 * @author yovinchen
 * @Create 2023/9/22 16:19
 */
@Component
public class ConstantPropertiesUtil implements InitializingBean {

    public static String WX_OPEN_APP_ID;
    public static String WX_OPEN_APP_SECRET;
    @Value("${wx.open.app_id}")
    private String appId;
    @Value("${wx.open.app_secret}")
    private String appSecret;

    @Override
    public void afterPropertiesSet() throws Exception {
        WX_OPEN_APP_ID = appId;
        WX_OPEN_APP_SECRET = appSecret;
    }
}
