Commit 6b9405d9d0f87eafaa7769285f653454cab769cf
1 parent
20a00615
feature(*): 配置腾讯推送相关key
- 配置腾讯推送相关key
Showing
5 changed files
with
37 additions
and
1 deletions
fw-hermes-server/src/main/java/cn/fw/hermes/config/AutoConfiguration.kt
... | ... | @@ -3,6 +3,7 @@ package cn.fw.hermes.config |
3 | 3 | import cn.fw.hermes.common.utils.logInfo |
4 | 4 | import cn.fw.hermes.service.property.MqttProperty |
5 | 5 | import cn.fw.hermes.service.property.SettingProperty |
6 | +import cn.fw.hermes.service.property.XinGeProperty | |
6 | 7 | import cn.hutool.core.util.IdUtil |
7 | 8 | import org.eclipse.paho.client.mqttv3.MqttAsyncClient |
8 | 9 | import org.eclipse.paho.client.mqttv3.MqttException |
... | ... | @@ -17,7 +18,7 @@ import org.springframework.context.annotation.Configuration |
17 | 18 | * @author kurisu |
18 | 19 | */ |
19 | 20 | @Configuration |
20 | -@EnableConfigurationProperties(MqttProperty::class, SettingProperty::class) | |
21 | +@EnableConfigurationProperties(MqttProperty::class, SettingProperty::class, XinGeProperty::class) | |
21 | 22 | class AutoConfiguration(private val mqttProperty: MqttProperty) { |
22 | 23 | @get:Throws(MqttException::class) |
23 | 24 | @get:Bean | ... | ... |
fw-hermes-server/src/main/resources/application-gray.yml
fw-hermes-server/src/main/resources/application-prd.yml
... | ... | @@ -28,3 +28,7 @@ mqtt: |
28 | 28 | enabled: true |
29 | 29 | access-token: 31a16df234bc4b78a29c5a4cc35a7421fc90a87cc339dbb545117b6966d2ca32 |
30 | 30 | secret: SEC509e8cd6d0c3969563acf9e33c177c49cf2a365cd60ddc841d4eb728afcd6940 |
31 | + | |
32 | +xinge: | |
33 | + appId: 1500039173 | |
34 | + secretKey: 1dcfb0e6b12e96c6aaec790ac9d89323 | ... | ... |
fw-hermes-server/src/main/resources/application.yml
... | ... | @@ -158,5 +158,12 @@ disturb: |
158 | 158 | end: '08:00' |
159 | 159 | enable: true |
160 | 160 | |
161 | +xinge: | |
162 | + appId: 1500039176 | |
163 | + secretKey: c0ebc445c0be30bc681bf90b0cbb9b1b | |
164 | + connectTimeOut: 15 | |
165 | + readTimeOut: 15 | |
166 | + domainUrl: https://api.tpns.tencent.com/ | |
167 | + | |
161 | 168 | task: |
162 | 169 | switch: 'on' | ... | ... |
fw-hermes-service/src/main/java/cn/fw/hermes/service/property/XinGeProperty.kt
0 → 100644
1 | +package cn.fw.hermes.service.property | |
2 | + | |
3 | +import org.springframework.boot.context.properties.ConfigurationProperties | |
4 | + | |
5 | +/** | |
6 | + * 信鸽配置 | |
7 | + * | |
8 | + * @author : kurisu | |
9 | + * @version : 1.0 | |
10 | + * @desc : 信鸽配置 | |
11 | + * @date : 2023-12-28 18:05 | |
12 | + */ | |
13 | +@ConfigurationProperties(prefix = "xinge") | |
14 | +data class XinGeProperty( | |
15 | + var appId: String?, | |
16 | + var secretKey: String?, | |
17 | + var connectTimeOut: Int = 10, | |
18 | + var readTimeOut: Int = 10, | |
19 | + var domainUrl: String? | |
20 | +) | ... | ... |