chengf
2025-10-28 2807cca4b6f2e8af204d798679dcee78e695ee28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.ruoyi.business.appuser.config;
 
import com.ruoyi.business.appuser.utils.JsonUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
 
import java.util.List;
 
/**
 * wechat mp properties
 *
 * @author <a href="https://github.com/binarywang">Binary Wang</a>
 */
@Data
@ConfigurationProperties(prefix = "wx.mp")
public class WxMpProperties {
    /**
     * 是否使用redis存储access token
     */
    private boolean useRedis;
 
    /**
     * redis 配置
     */
    private RedisConfig redisConfig;
    /**
     * 多个公众号配置信息
     */
    private List<MpConfig> configs;
 
    @Override
    public String toString() {
        return JsonUtils.toJson(this);
    }
 
    @Data
    public static class RedisConfig {
        /**
         * redis服务器 主机地址
         */
        private String host;
 
        /**
         * redis服务器 端口号
         */
        private Integer port;
 
        /**
         * redis服务器 密码
         */
        private String password;
 
        /**
         * redis 服务连接超时时间
         */
        private Integer timeout;
    }
 
    @Data
    public static class MpConfig {
        /**
         * 设置微信公众号的appid
         */
        private String appId;
 
        /**
         * 设置微信公众号的app secret
         */
        private String secret;
 
        /**
         * 设置微信公众号的token
         */
        private String token;
 
        /**
         * 设置微信公众号的EncodingAESKey
         */
        private String aesKey;
    }
}