package com.xunwang.ucenter.utils;

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

/**
 * 微信小程序公共的常量
 */
@Component
public class WxConstantUtils implements InitializingBean {

    @Value("${wx.appid}")
    private String appid;

    @Value("${wx.secret}")
    private String secret;

    @Value("${wx.grant_type}")
    private String grant_type;

    public static String APPID;

    public static String SECRET;

    public static String GRANT_TYPE;

    @Override
    public void afterPropertiesSet() throws Exception {
        APPID = appid;
        SECRET = secret;
        GRANT_TYPE = grant_type;
    }
}
