feat: 重构项目结构并新增微信小程序认证模块

This commit is contained in:
Ray.Hao
2026-03-24 07:52:05 +08:00
parent 465e63c99d
commit 8188c82c3d
158 changed files with 1342 additions and 1562 deletions

View File

@@ -1,38 +0,0 @@
package com.youlai.boot.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 com.youlai.boot.config.property.WxMaProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 微信小程序配置
*
* @author Ray.Hao
* @since 2024/01/01
*/
@Configuration
@EnableConfigurationProperties(WxMaProperties.class)
public class WxMaConfig {
/**
* 微信小程序服务
*
* @param properties 微信小程序配置属性
* @return {@link WxMaService}
*/
@Bean
public WxMaService wxMaService(WxMaProperties properties) {
WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
config.setAppid(properties.getAppid());
config.setSecret(properties.getSecret());
WxMaService service = new WxMaServiceImpl();
service.setWxMaConfig(config);
return service;
}
}