阿里云的消息服务怎么集成spring boot?

阿里云的消息服务怎么集成spring boot


慕容森
浏览 1242回答 1
1回答

LEATH

@Configurationpublic class MnsConfig {@Beanpublic MNSClient getClient() {CloudAccount account = new CloudAccount(ServiceSettings.getMNSAccessKeyId(),ServiceSettings.getMNSAccessKeySecret(),ServiceSettings.getMNSAccountEndpoint());MNSClient client = account.getMNSClient();return client;}}建一个配置类使用的时候@Autowiredprivate MNSClient  client 这样引入就可以了
打开App,查看更多内容
随时随地看视频慕课网APP