-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: introduce McpServerObjectMapperFactory for consistent ObjectMapper configuration #4730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…per configuration Signed-off-by: liugddx <liugddx@gmail.com>
…per configuration Signed-off-by: liugddx <liugddx@gmail.com>
ericbottard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @liugddx!
I've got a couple of questions, I hope you have the time to address
...ava/org/springframework/ai/mcp/server/common/autoconfigure/McpServerObjectMapperFactory.java
Outdated
Show resolved
Hide resolved
.../java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/springframework/ai/mcp/server/common/autoconfigure/McpToolWithStdioIT.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/springframework/ai/mcp/server/common/autoconfigure/McpToolWithStdioIT.java
Show resolved
Hide resolved
.../java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java
Show resolved
Hide resolved
…rFactory Signed-off-by: liugddx <liugddx@gmail.com>
|
Hi @liugddx, @sivaprasadreddy, unfortunately, we ran into last minute issues with this PR which interferes with other We're trying to find the best way to make the mcp ObjectMapper correctly configured, yet still overridable by users and ALSO not messing with potential other ObjectMappers in their app (be them provided by Boot or not). |
If there's anything I can do to help, just let me know. |
Adjust tests Closes spring-projects#4730 Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
Adjust tests Closes spring-projects#4730 Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
- Add McpServerObjectMapperAutoConfiguration which includes mcpServerObjectMapper with the explicit bean name qualifier "mcpServerObjectMapper" and the configuration "defaultCandidate = false" - The "defaultCandidate = false" configuration makes sure the mcpServerObjectMapper doesn't get injected as the ObjectMapper bean when the qualifier "mcpServerObjectMapper" isn't explciitly specified. This allows other default or custom ObjectMapper beans to be in used in other parts of the applications. - Use qualified "mcpServerObjectMapper" bean name for the MCP specific ObjectMapper beans - Adjust tests Closes spring-projects#4730 Co-authored-by: liugddx <liugddx@gmail.com> Signed-off-by: Eric Bottard <eric.bottard@broadcom.com> Signed-off-by: logan-mac <ralla0405@gmail.com>
Close #4451
Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:
git commit -s) per the DCOmainbranch and squash your commitsFor more details, please check the contributor guide.
Thank you upfront!