首页>代码>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;
}
}
最近下载更多
最近浏览更多
微信公众号-Java驿站 LV6
昨天
14716825 LV1
1月2日
爱情戴罪的羔羊 LV7
2025年12月29日
tangdou1314
2025年12月26日
暂无贡献等级
jackcio LV9
2025年12月23日
程序猿全敏 LV29
2025年12月23日
刘先生-OL LV13
2025年12月22日
我们都是小怪兽 LV3
2025年12月22日
wanglinddad LV55
2025年12月2日
zq1685 LV4
2025年11月26日

