Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
wx.mp.aes-key=@aesKey
wx.mp.use-stable-access-token=@useStableAccessToken
# 存储配置redis(可选)
# 注意: 下方 redis.host 仅为显式配置示例,默认不配置。省略时,Jedis/Redisson 模式分别复用容器中的 JedisPool/RedissonClient
wx.mp.config-storage.type= edis # 配置类型: Memory(默认), Jedis, RedisTemplate
wx.mp.config-storage.key-prefix=wx # 相关redis前缀配置: wx(默认)
wx.mp.config-storage.redis.host=127.0.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public class RedisProperties implements Serializable {
private static final long serialVersionUID = -5924815351660074401L;

/**
* 主机地址.
* 主机地址.不填则从spring容器内获取JedisPool或RedissonClient
*/
private String host = "127.0.0.1";
private String host;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 说明省略 Redis host 时的客户端复用契约

在 wx.mp.config-storage.type=jedis/redisson 场景,此行把“省略 host”变成复用容器中客户端的配置契约,但该模块的 README.md 仍只给出显式的 host=127.0.0.1,当前字段说明也没有说明省略值需要现有客户端;发布后用户无法从随包文档得知新用法,并会在容器中没有相应 bean 时直到启动阶段才看到失败。请同步补充 host 的省略语义及前置条件。

AGENTS.md reference: AGENTS.md:L89-L89

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 为 Redis 客户端回退增加回归测试

该修改通过把 host 默认值设为 null 来切换 WxMpInRedissonConfigStorageConfiguration 和 WxMpInJedisConfigStorageConfiguration 的 bean 查找分支,但受影响模块当前没有测试覆盖“省略 host 且容器已有客户端”的启动场景;以后默认值或分支改动时,原来的 NoSuchBeanDefinitionException 可以直接回归而 CI 无法发现。请添加最小 Spring 上下文回归测试,至少验证未配置 host 时会复用已有 RedissonClient,并覆盖同一字段影响的 Jedis 分支。

AGENTS.md reference: AGENTS.md:L64-L64

Useful? React with 👍 / 👎.


/**
* 端口号.
Expand Down
Loading