Copilot commented on code in PR #7960:
URL: https://github.com/apache/incubator-seata/pull/7960#discussion_r2725401708


##########
changes/en-us/2.x.md:
##########
@@ -28,6 +28,7 @@ Add changes here for all PR submitted to the 2.x branch.
 
 - [[#7929](https://github.com/apache/incubator-seata/pull/7929)] fix 
KingbaseUndoLogManager INSERT_UNDO_LOG_SQL error
 - [[#7940](https://github.com/apache/incubator-seata/pull/7940)] ensure the 
Jakarta-related package paths are correct
+- [[#7960](https://github.com/apache/incubator-seata/pull/7960)] fix 
consoleApiService bean that could not be found

Review Comment:
   The bugfix entry here references PR #7960, but `changes/en-us/2.6.0.md` 
records the same fix as PR #7959. These release notes should point to the same 
PR number; please reconcile the link/number so the changelog is consistent.



##########
changes/en-us/2.6.0.md:
##########
@@ -74,6 +74,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#7891](https://github.com/apache/incubator-seata/pull/7891)] raft 
split-brain causes incorrect cluster information
 - [[#7908](https://github.com/apache/incubator-seata/pull/7908)] handle 
timestamp with time zone in postgresql primary key
 - [[#7938](https://github.com/apache/incubator-seata/pull/7938)] ensure the 
Jakarta-related package paths are correct.
+- [[#7959](https://github.com/apache/incubator-seata/pull/7959)] fix 
consoleApiService bean that could not be found

Review Comment:
   This bugfix entry links to PR #7959, while the 2.x aggregated changelog 
(`changes/en-us/2.x.md`) links the same fix as PR #7960. Please ensure the PR 
number/link is consistent across release notes.



##########
changes/zh-cn/2.6.0.md:
##########
@@ -74,6 +74,7 @@
 - [[#7891](https://github.com/apache/incubator-seata/pull/7891)] 
修复raft重选举与心跳并发时可能导致namingserver侧的元数据存在多个leader
 - [[#7908](https://github.com/apache/incubator-seata/pull/7908)] 在 PostgreSQL 
主键中处理带时区的时间戳
 - [[#7938](https://github.com/apache/incubator-seata/pull/7938)] 
保证Jakarta相关包路径正确
+- [[#7959](https://github.com/apache/incubator-seata/pull/7959)] 
修复consoleApiService bean未加载的问题

Review Comment:
   This bugfix entry links to PR #7959, while the 2.x aggregated changelog 
(`changes/zh-cn/2.x.md`) links the same fix as PR #7960. Please ensure the PR 
number/link is consistent across release notes.



##########
changes/zh-cn/2.6.0.md:
##########
@@ -124,6 +125,7 @@
 - [[#7913](https://github.com/apache/incubator-seata/pull/7913)] 移除 @author 信息
 - [[#7931](https://github.com/apache/incubator-seata/pull/7931)] 
固定namingserver和console的spring版本
 - [[#7942](https://github.com/apache/incubator-seata/pull/7942)] 
升级jib-maven-plugin版本和提高ci并行度
+- [[#7935](https://github.com/apache/incubator-seata/pull/7935)] 添加 OkHttp 和 
MockWebServer 依赖来解决版本冲突

Review Comment:
   This PR adds an optimize release-note entry for PR #7935 in the 2.6.0 notes. 
That change appears unrelated to the "consoleApiService bean" bugfix described 
by this PR; if this was added accidentally, please remove it (or move it to the 
PR that introduced #7935).



##########
console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java:
##########
@@ -44,10 +43,12 @@
 import static org.apache.seata.mcp.core.utils.UrlUtils.buildUrl;
 import static org.apache.seata.mcp.core.utils.UrlUtils.objectToQueryParamMap;
 
-@ConditionalOnMissingBean(NamingServerLocalMarker.class)
+@ConditionalOnMissingBean(name = "consoleLocalServiceImpl")

Review Comment:
   `@ConditionalOnMissingBean(name = "consoleLocalServiceImpl")` relies on a 
hard-coded bean name, which is brittle (renaming the class, adding a custom 
`@Service("...")`, or component scanning changes can break the condition and 
may lead to both ConsoleApiService implementations being registered). Prefer a 
type-based condition such as 
`@ConditionalOnMissingBean(ConsoleApiService.class)` so Spring backs off 
whenever any other ConsoleApiService exists, without depending on bean naming.
   ```suggestion
   @ConditionalOnMissingBean(ConsoleApiService.class)
   ```



##########
changes/zh-cn/2.x.md:
##########
@@ -28,7 +28,7 @@
 
 - [[#7929](https://github.com/apache/incubator-seata/pull/7929)] 修复 
KingbaseUndoLogManager INSERT_UNDO_LOG_SQL 错误
 - [[#7940](https://github.com/apache/incubator-seata/pull/7940)] 
保证Jakarta相关包路径正确
-
+- [[#7960](https://github.com/apache/incubator-seata/pull/7960)] 
修复consoleApiService bean未加载的问题

Review Comment:
   The bugfix entry here references PR #7960, but `changes/zh-cn/2.6.0.md` 
records the same fix as PR #7959. These release notes should point to the same 
PR number; please reconcile the link/number so the changelog is consistent.



##########
changes/en-us/2.6.0.md:
##########
@@ -125,6 +126,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#7913](https://github.com/apache/incubator-seata/pull/7913)] remove 
@author info
 - [[#7931](https://github.com/apache/incubator-seata/pull/7931)] pin the 
Spring version for namingserver and console
 - [[#7942](https://github.com/apache/incubator-seata/pull/7942)] update 
jib-maven-plugin version and increase parallel test execution limits
+- [[#7935](https://github.com/apache/incubator-seata/pull/7935)] add OkHttp 
and MockWebServer dependencies to resolve version conflicts

Review Comment:
   This PR adds an optimize release-note entry for PR #7935 in the 2.6.0 notes. 
That change appears unrelated to the "consoleApiService bean" bugfix described 
by this PR; if this was added accidentally, please remove it (or move it to the 
PR that introduced #7935).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to