首页>代码>springboot开发微信记事本小程序,实际运行地址搜,记事本随手记就好了>/untitled4/src/main/java/com/rgzn/app/config/WxMaConfiguration.java
package com.rgzn.app.config;

import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "wx.miniapp")
public class WxMaConfiguration {
    private String appId;
    private String secret;
    private String token;
    private String aesKey;

    @Bean
    public WxMaService wxMaService() {
        WxMaService service = new WxMaServiceImpl();
        WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
        config.setAppid(appId);
        config.setSecret(secret);
        config.setToken(token);
        config.setAesKey(aesKey);
        service.setWxMaConfig(config);
        return service;
    }
}
最近下载更多
全栈小白  LV35 昨天
半夏bx  LV15 9月8日
唐僧洗头爱飘柔  LV22 7月10日
ewan007  LV30 7月2日
欠踹de背影  LV25 6月30日
最代码官方  LV168 6月29日
最近浏览更多
zhaixunfei  LV8 昨天
全栈小白  LV35 昨天
Hachi6  LV13 11月14日
jlmarket  LV22 11月13日
torqi-kiram  LV1 11月12日
马儿爱吃兰  LV10 11月8日
huming  LV4 11月4日
Coffee_冬孓  LV12 10月17日
sos0531  LV8 10月13日
310834626  LV3 10月11日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友