2 回答
米脂
TA贡献1836条经验 获得超3个赞
@Configuration
public class MnsConfig {
@Bean
public MNSClient getClient() {
CloudAccount account = new CloudAccount(
ServiceSettings.getMNSAccessKeyId(),
ServiceSettings.getMNSAccessKeySecret(),
ServiceSettings.getMNSAccountEndpoint());
MNSClient client = account.getMNSClient();
return client;
}
}
建一个配置类
使用的时候@Autowired
private MNSClient client 这样引入就可以了
- 2 回答
- 0 关注
- 1535 浏览
添加回答
举报
0/150
提交
取消