ghy-all/ghy-message/src/main/java/com/ghy/message/config/JimConfig.java

30 lines
653 B
Java
Raw Normal View History

package com.ghy.message.config;
import cn.jmessage.api.JMessageClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author clunt
* 极光消息配置文件
*/
@Configuration
@ConfigurationProperties(prefix = "jim")
@Data
public class JimConfig {
private String appKey;
private String masterSecret;
private String maxRetryTimes;
@Bean
public JMessageClient jMessageClient(){
return new JMessageClient(appKey,masterSecret,maxRetryTimes);
}
}