You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: optimize MCP annotation processing with targeted bean filtering
- Replace getAllAnnotatedBeans() with getBeansByAnnotation() for specific annotation types
- Add explicit imports for MCP annotations (McpElicitation, McpLogging, McpProgress, McpSampling, McpComplete, McpPrompt, McpResource, McpTool)
- Rename parameter from beanRegistry to beansWithMcpMethodAnnotations for clarity
- Remove duplicate test file StreamableMcpAnnotations2IT.java
- Clean up manual bean configuration in favor of auto-configuration
- Update MCP SDK from 0.12.0-SNAPSHOT to 0.11.3 stable release
- Update MCP annotations from 0.2.0-SNAPSHOT to 0.2.0 stable release
This change improves performance by filtering beans by specific annotation types
rather than processing all annotated beans, making the MCP feature detection
more efficient and targeted.
Signed-off-by: Christian Tzolov <[email protected]>
Copy file name to clipboardExpand all lines: auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-common/src/main/java/org/springframework/ai/mcp/client/common/autoconfigure/annotations/ClientSpecificationFactoryAutoConfiguration.java
Copy file name to clipboardExpand all lines: auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/annotations/ServerSpecificationFactoryAutoConfiguration.java
Copy file name to clipboardExpand all lines: auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/annotations/StatelessServerSpecificationFactoryAutoConfiguration.java
Copy file name to clipboardExpand all lines: auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webflux/src/test/java/org/springframework/ai/mcp/server/autoconfigure/StreamableMcpAnnotationsIT.java
0 commit comments