longz
2026-04-21 58c73134fb1ce10c1ea1d95ee66d8c89557d7dee
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();
    }
}