package com.yonge.cooleshow.auth.config;

import io.rong.RongCloud;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class RongCloudConfig {

    @Value("${cn.rongcloud.im.appkey}")
    private String appKey;
    @Value("${cn.rongcloud.im.secret}")
    private String appSecret;

    public static RongCloud rongCloud;

    @Bean
    @Primary
    public void getRongCloud() {
        rongCloud = RongCloud.getInstance(appKey,appSecret);
    }
}
