spring-ai
spring-ai copied to clipboard
Fix: Prevent exceptions when disabling MCP Server
- Prevent projects depending on
mcp-server-webmvcormcp-server-webfluxfrom exceptions whenspring.ai.mcp.server.enabledis set tofalse. - Add unit tests to verify.
When the project depends on the spring-ai-starter-mcp-server-webmvc package but attempts to temporarily disable the MCP server (via spring.ai.mcp.server.enabled=false), the following exception is thrown:
Hi @tzolov , as the main author of MCP Server, could you review this PR? Thank you!
Thanks you for catching and fixing this @YunKuiLu ! Bonus points for the tests ;)
Rebased and merged at c2843f19905b05ab734b20b736f83fc1e06e054d