Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ea5888d
:new: 完成 wx-java-channel-solon-plugin 适配
noear Sep 2, 2024
26c312b
:new: 完成 wx-java-cp-multi-solon-plugin 适配
noear Sep 2, 2024
1890e0a
:new: 完成 wx-java-cp-solon-plugin 适配
noear Sep 2, 2024
17be5c8
:new: 完成 wx-java-miniapp-solon-plugin 适配
noear Sep 2, 2024
027918c
:new: 完成 wx-java-mp-multi-solon-plugin 适配
noear Sep 2, 2024
0ea9c63
:new: 完成 wx-java-mp-solon-plugin 适配
noear Sep 2, 2024
e4c16dc
:new: 完成 wx-java-open-solon-plugin 适配
noear Sep 2, 2024
5403878
:new: 完成 wx-java-pay-solon-plugin 适配
noear Sep 2, 2024
1cf2da1
:new: 完成 wx-java-qidian-solon-plugin 适配
noear Sep 2, 2024
bf52cc4
:new: 完成 solon-plugins 适配
noear Sep 2, 2024
2840c70
:new: 完成 solon-plugins 适配(优化注释细节)
noear Sep 2, 2024
1af217a
Merge branch 'Wechat-Group:develop' into develop
noear Sep 4, 2024
b5faaf4
:new: 添加 solon-plugins 单测,可触发必要错误用于人工核对
noear Sep 4, 2024
0bc55a3
:art: 修正 wx-java-qidian-solon-plugin 和 wx-java-qidian-spring-boot-sta…
noear Sep 7, 2024
484bb9e
Merge branch 'Wechat-Group:develop' into develop
noear Sep 7, 2024
81ab551
Merge branch 'Wechat-Group:develop' into develop
noear Sep 9, 2024
4372ba5
Merge branch 'Wechat-Group:develop' into develop
noear Oct 9, 2024
59f086f
:new: 添加 solon-plugins / wx-java-channel-multi-solon-plugin 模块
noear Oct 9, 2024
a154531
:new: 添加 solon-plugins / wx-java-miniapp-multi-solon-plugin 模块
noear Oct 9, 2024
2765045
Merge remote-tracking branch 'origin/develop' into develop
noear Apr 19, 2025
1c78e4e
:new: 添加 solon-plugins / wx-java-channel-solon-plugin README.md,并且 so…
noear Apr 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solon-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<description>WxJava 各个模块的 Solon Plugin</description>

<properties>
<solon.version>3.0.1</solon.version>
<solon.version>3.2.0</solon.version>
</properties>

<modules>
Expand Down
92 changes: 92 additions & 0 deletions solon-plugins/wx-java-channel-solon-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# wx-java-channel-solon-plugin

## 快速开始
1. 引入依赖
```xml
<dependencies>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>wx-java-channel-solon-plugin</artifactId>
<version>${version}</version>
</dependency>

<!-- 配置存储方式为jedis 则引入jedis -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>

<!-- 配置存储方式为redisson 则引入redisson -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
</dependencies>
```
2. 添加配置(app.properties)
```properties
# 视频号配置(必填)
## 视频号小店的appId和secret
wx.channel.app-id=@appId
wx.channel.secret=@secret
# 视频号配置 选填
## 设置视频号小店消息服务器配置的token
wx.channel.token=@token
## 设置视频号小店消息服务器配置的EncodingAESKey
wx.channel.aes-key=
## 支持JSON或者XML格式,默认JSON
wx.channel.msg-data-format=JSON
## 是否使用稳定版 Access Token
wx.channel.use-stable-access-token=false


# ConfigStorage 配置(选填)
## 配置类型: memory(默认), jedis, redisson, redis_template
wx.channel.config-storage.type=memory
## 相关redis前缀配置: wx:channel(默认)
wx.channel.config-storage.key-prefix=wx:channel
wx.channel.config-storage.redis.host=127.0.0.1
wx.channel.config-storage.redis.port=6379
wx.channel.config-storage.redis.password=123456


# http 客户端配置(选填)
## # http客户端类型: http_client(默认)
wx.channel.config-storage.http-client-type=http_client
wx.channel.config-storage.http-proxy-host=
wx.channel.config-storage.http-proxy-port=
wx.channel.config-storage.http-proxy-username=
wx.channel.config-storage.http-proxy-password=
## 最大重试次数,默认:5 次,如果小于 0,则为 0
wx.channel.config-storage.max-retry-times=5
## 重试时间间隔步进,默认:1000 毫秒,如果小于 0,则为 1000
wx.channel.config-storage.retry-sleep-millis=1000
```
3. 自动注入的类型
- `WxChannelService`
- `WxChannelConfig`
4. 使用样例

```java
import me.chanjar.weixin.channel.api.WxChannelService;
import me.chanjar.weixin.channel.bean.shop.ShopInfoResponse;
import me.chanjar.weixin.channel.util.JsonUtils;
import me.chanjar.weixin.common.error.WxErrorException;
import org.noear.solon.annotation.Inject;

@Component
public class DemoService {
@Inject
private WxChannelService wxChannelService;

public String getShopInfo() throws WxErrorException {
// 获取店铺基本信息
ShopInfoResponse response = wxChannelService.getBasicService().getShopInfo();
// 此处为演示,如果要返回response的结果,建议自己封装一个VO,避免直接返回response
return JsonUtils.encode(response);
}
}
```