# spring-boot-push **Repository Path**: targer/spring-boot-push ## Basic Information - **Project Name**: spring-boot-push - **Description**: No description available - **Primary Language**: Unknown - **License**: WTFPL - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-21 - **Last Updated**: 2022-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Spring Boot Starter push 整合了个推和极光 SDK,为Spring Boot 项目提供服务功能。 # API ```java @Autowired SenderActivity senderActivity; @Test public void pushMsg(){ SendRequest sendRequest = new SendRequest(); sendRequest.setCid("1104a89792615ce232a"); MessageParam messageParam = new MessageParam(); messageParam.setTitle("哈哈头"); messageParam.setBody("测试报文"); sendRequest.setMessageParam(messageParam); // 个推 senderActivity.singleMsg(PushSender.PushSenderEnum.GE_TUI ,sendRequest); // 极光 senderActivity.singleMsg(PushSender.PushSenderEnum.JI_GUANG ,sendRequest); } ``` `application.yaml`的配置 ```yaml push: # 个推 getui: appId: bgEs0awvSI8SeT93Es38l8 # 应用key appKey: 6Qekdpkx5l6BxpGTWFSkt5 # 应用密钥 masterSecret: QjDx9zJhdq9dvgLfQ4ufY5 # 极光 jiguang: # 应用key appKey: 769873be50c4ac2af94a3785 # 应用密钥 masterSecret: 94f38872b2fe07594a72f495 ```