longz
2026-07-13 5882ba8863d77fdcc168b176c3ffb30e8a20556a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.sinata.appointment.config;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
 
@Data
@ConfigurationProperties(prefix = "wechat.official-account")
public class WechatOfficialAccountProperties {
 
    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();
    }
}