依赖jar包

引入包 版本
jdk 1.8
spring boot 2.7.2
spring-boot-autoconfigure 2.7.2
gexin-rp-sdk-http 4.1.1.4

使用

添加依赖

1
2
3
4
5
<dependency>
<groupId>cn.allbs</groupId>
<artifactId>allbs-unipush</artifactId>
<version>1.2.0</version>
</dependency>
1
implementation 'cn.allbs:allbs-unipush:1.2.0'
1
implementation("cn.allbs:allbs-unipush:1.2.0")

添加配置

1
2
3
4
5
6
7
uni-push:
app-id: cnvd9OFb4V9tCB2lUrLAT6
app-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
app-secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
master-secret: yUTUtfDQ129wG2qKh8elcxsdsfgwewe
url: http://api.getui.com/apiex.htm
offline-expire-time: 720

template注入

1
private fianl UniPushTemplate uniPushTemplate;

数据推送

1
uniPushTemplate.pushToAllUser("测试标题", "测试内容");