30 lines
653 B
Java
30 lines
653 B
Java
|
|
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);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|