xin
2025-05-30 347909bae241fff128b628ea6d12992d7e5b4b10
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
package com.oying.modules.security.config;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
@Data
@Configuration
@ConfigurationProperties(prefix = "wx")
public class WeiXinProperties {
    // APPID
    private String appId;
    // APP密钥
    private String appSecret;
    // 跳转小程序类型
    private String miniProgramState;
    /*access_token的KEY*/
    private String tokenKey;
    /*access_token的失效时间间隔,微信是2小时,此处隔7200秒就重新获取*/
    private Long tokenTime;
    /*POST 获取稳定版接口调用凭据 获取小程序全局唯一后台接口调用凭据,token有效期为7200s,开发者需要进行妥善保存。*/
    private String getStableAccessToken;
    /*GET 小程序登录 登录凭证校验。通过 wx.login 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程*/
    private String code2Session;
    /*POST 获取手机号 该接口用于将code换取用户手机号。 说明,每个code只能使用一次,code的有效期为5min。*/
    private String getPhoneNumber;
    /*POST 该接口用于发送订阅消息。*/
    private String sendMessage;
    /* 是否生成环境*/
    private boolean enabled;
}