longz
2026-05-28 aa67b3cb0fe26fab576f7710c978ff3594426cca
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
package com.sinata.appointment.config;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
 
@Data
@ConfigurationProperties(prefix = "wechat.miniapp")
public class WechatMiniAppProperties {
 
    private String appId = "";
 
    private String appSecret = "";
 
    /**
     * true 或未配置 appId/secret 时使用桩实现(联调不上微信服务器)。
     */
    private boolean stub = true;
 
    public boolean useStub() {
        return stub
                || appId == null
                || appId.isBlank()
                || appSecret == null
                || appSecret.isBlank();
    }
}