spring-ai
spring-ai copied to clipboard
Fix: Prevent exceptions when disabling MCP Server
trafficstars
- 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: