fix: fix nacos mcp server import with endpoint info#122
Merged
learnerjohn merged 1 commit intohigress-group:mainfrom Dec 15, 2025
Merged
fix: fix nacos mcp server import with endpoint info#122learnerjohn merged 1 commit intohigress-group:mainfrom
learnerjohn merged 1 commit intohigress-group:mainfrom
Conversation
重构Nacos MCP服务器端点URL构建逻辑并添加单元测试变更概述
变更文件
时序图sequenceDiagram
participant NS as NacosServiceImpl
participant ME as McpEndpointInfo
NS->>ME: 获取协议、地址、端口和路径
alt 地址是完整的URL
NS->>NS: 解析URI并补全缺少的部分
else 处理普通地址或IPv6地址
NS->>NS: 根据规则拼接URL
end
NS->>NS: 返回构造好的URL字符串
💡 小贴士与 lingma-agents 交流的方式📜 直接回复评论
📜 在代码行处标记
📜 在讨论中提问
|
- Refactor Nacos MCP endpoint URL building to use McpEndpointInfo directly - Add unit tests for endpoint URL construction and remote config - Manage Surefire plugin in parent pom so JUnit 5 tests run Fix higress-group#121 Change-Id: Ic8287a5f8c1ce946c586d7360eead5f2faf2bceb
df41436 to
10106ce
Compare
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.
Change-Id: Ic8287a5f8c1ce946c586d7360eead5f2faf2bceb
Description
com.alibaba.nacos.api.ai.model.mcp.McpEndpointInfodirectly (based onprotocol/address/port/path), removing the previousObject/Map/reflectionparsing to improve type-safety and maintainability. The implementation also handles inputs such as full URLs,host:port, and IPv6 forms.buildRemoteConnectionConfigoutput to prevent regressions.maven-surefire-pluginin the parentpom.xmlto ensure JUnit 5 tests are properly discovered and executed across modules.Related Issues
#121
Checklist
mvn spotless:apply