package com.ruoyi.framework.config;

import cn.jpush.api.JPushClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
@ConfigurationProperties
public class JiGuangConfig {
    // 极光官网-个人管理中心-appkey
    @Value("${push.appkey}")
    private String appkey;
    // 极光官网-个人管理中心-点击查看-secret
    @Value("${push.secret}")
    private String secret;

    // 获取推送客户端
    public JPushClient getJPushClient() {
        JPushClient jPushClient = new JPushClient(secret, appkey);
        return jPushClient;
    }
}