jiangping
2024-07-18 64a6a81753abfc712b1ab384de0f7afb87f4fb23
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
 
package com.doumee.core.wx.wxPlat;
 
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.utils.Constants;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import me.chanjar.weixin.mp.config.WxMpConfigStorage;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/12/27 9:30
 */
@Configuration
@Slf4j
public class WxPlatConfig {
 
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
 
//    @Bean
    public WxMpConfigStorage wxMpConfigStorage() {
        WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl();
 
        return configStorage;
    }
 
 
    /**
     * 声明实例
     *
     * @return
     */
    @Bean
    public WxMpService wxMpService() {
        WxMpService wxMpService = new WxMpServiceImpl();
        wxMpService.setWxMpConfigStorage(wxMpConfigStorage());
        return wxMpService;
    }
 
}