Repository navigation
Conversation
ChannelNoticeController#doReturn 是返回视图名的 @controller 方法,先调用 response.sendRedirect() 再返回 null,响应已提交后 Spring MVC 仍会按请求路径 推导视图名并解析静态资源,产生 NoResourceFoundException(response committed already)告警。改为返回 "redirect:" + url,由 Spring MVC 统一处理重定向。 onlyJump 同样改为返回视图名(直接跳转地址或支付结果页),并补上原先被忽略的 toReturnPage 返回值,避免订单不存在时继续执行导致的空指针。 同时补充 ChannelNoticeControllerTest 回归用例,覆盖携带 returnUrl、直接跳转 (ONLYJUMP_)与未携带 returnUrl 三种场景。
基于社区 PR #145 保留原贡献提交,仅补充真实 MVC 路由测试。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
定位与来源
这是社区 #145(@rwzdk)的独立补测草稿,保留其原提交,再追加 MVC 测试;不是要求同时合并两个重复修复。原 PR 保持开放、原分支不改,由维护者选择最终承载方式。
范围
补充真实 MockMvc/DispatcherServlet 的 302、Location/签名查询串原样保留、渲染前未提交、成功无警告以及 ONLYJUMP 缺订单/returnUrl 分支。生产修复与 #145 相同。
验证
本地官方 JDK17:payment -am test 共21项通过(core10/MQ4/payment7);仅回退 Controller 至 dev 基线时新增4项中3项失败,恢复后通过。
命令:mvn -B -pl jeepay-payment -am test(本地容器使用启动 ByteBuddy javaagent 解决 self-attach 限制)。git diff --check通过。
远端 CI 尚待本草稿 head 运行,不把本地结果视为远端通过。
边界
合成数据,standalone MVC 非完整 Freemarker/Servlet 部署;签名 URL 为 mock,仅验证保留,不验证签名算法。无真实支付、配置/数据库变更或发布。请勿自动合并。
远端 CI 已核实(2026-10-27 14:48 UTC)
CI run 40524246655 在本草稿 head
b255c11ab52f6afce8225c74c39b5aceb51e4d29已 completed/success;Shell 安装脚本断言与 Maven 编译(含 JDK17 编译/测试编译/单元及授权回归)均通过。以上替代前文创建时“待运行”的状态。远端文件已与本地已测试版本逐一比对一致。保留草稿供维护者审核,CI 通过不消除上文业务/渠道边界,也不授权自动合并或发版。