Skip to content

Commit 510adf9

Browse files
committed
Polishing
1. Fix typo 2. Remove redundant `matchIfMissing = false` since it's default value Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
1 parent eda3c74 commit 510adf9

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
@EnableConfigurationProperties({ McpServerProperties.class, McpServerChangeNotificationProperties.class })
8282
@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "enabled", havingValue = "true",
8383
matchIfMissing = true)
84-
@Conditional(McpServerAutoConfiguration.NonStatlessServerCondition.class)
84+
@Conditional(McpServerAutoConfiguration.NonStatelessServerCondition.class)
8585
public class McpServerAutoConfiguration {
8686

8787
private static final LogAccessor logger = new LogAccessor(McpServerAutoConfiguration.class);
@@ -295,9 +295,9 @@ public McpAsyncServer mcpAsyncServer(McpServerTransportProviderBase transportPro
295295
return serverBuilder.build();
296296
}
297297

298-
public static class NonStatlessServerCondition extends AnyNestedCondition {
298+
public static class NonStatelessServerCondition extends AnyNestedCondition {
299299

300-
public NonStatlessServerCondition() {
300+
public NonStatelessServerCondition() {
301301
super(ConfigurationPhase.PARSE_CONFIGURATION);
302302
}
303303

@@ -308,7 +308,7 @@ static class SseEnabledCondition {
308308
}
309309

310310
@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol",
311-
havingValue = "STREAMABLE", matchIfMissing = false)
311+
havingValue = "STREAMABLE")
312312
static class StreamableEnabledCondition {
313313

314314
}
@@ -348,7 +348,7 @@ static class McpServerEnabledCondition {
348348
}
349349

350350
@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol",
351-
havingValue = "STREAMABLE", matchIfMissing = false)
351+
havingValue = "STREAMABLE")
352352
static class StreamableEnabledCondition {
353353

354354
}

auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerStatelessAutoConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ static class McpServerEnabledCondition {
234234

235235
}
236236

237-
@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol", havingValue = "STATELESS",
238-
matchIfMissing = false)
237+
@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol", havingValue = "STATELESS")
239238
static class StatelessEnabledCondition {
240239

241240
}

auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/ToolCallbackConverterAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
@AutoConfiguration
4343
@EnableConfigurationProperties(McpServerProperties.class)
4444
@Conditional({ ToolCallbackConverterAutoConfiguration.ToolCallbackConverterCondition.class,
45-
McpServerAutoConfiguration.NonStatlessServerCondition.class })
45+
McpServerAutoConfiguration.NonStatelessServerCondition.class })
4646
public class ToolCallbackConverterAutoConfiguration {
4747

4848
@Bean

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-overview.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ Spring AI provides MCP integration through the following Spring Boot starters:
9696
|Server Type | Dependency | Property
9797
| xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webmvc_serve[SSE WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=SSE` or empty
9898
| xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webmvc_server[Streamable-HTTP WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STREAMABLE`
99-
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATLESS`
99+
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATELESS`
100100
|===
101101

102102
==== WebMVC (Reactive)
103103
|===
104104
|Server Type | Dependency | Property
105105
| xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webflux_serve[SSE WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=SSE` or empty
106106
| xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webflux_server[Streamable-HTTP WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STREAMABLE`
107-
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATLESS`
107+
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATELESS`
108108
|===
109109

110110
== xref:api/mcp/mcp-annotations-overview.adoc[Spring AI MCP Annotations]

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-server-boot-starter-docs.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ Use the dedicated starter and the correct `spring.ai.mcp.server.protocol` proper
3535
|Server Type | Dependency | Property
3636
| xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webmvc_serve[SSE WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=SSE` or empty
3737
| xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webmvc_server[Streamable-HTTP WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STREAMABLE`
38-
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATLESS`
38+
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATELESS`
3939
|===
4040

4141
=== WebMVC (Reactive)
4242
|===
4343
|Server Type | Dependency | Property
4444
| xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webflux_serve[SSE WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=SSE` or empty
4545
| xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webflux_server[Streamable-HTTP WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STREAMABLE`
46-
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATLESS`
46+
| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATELESS`
4747
|===
4848

4949
== Server Capabilities

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-stateless-server-boot-starter-docs.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Use the `spring-ai-starter-mcp-server-webmvc` dependency:
2222
</dependency>
2323
----
2424

25-
and set the `spring.ai.mcp.server.protocol` property to `STATLESS`.
25+
and set the `spring.ai.mcp.server.protocol` property to `STATELESS`.
2626

2727
----
28-
spring.ai.mcp.server.protocol=STATLESS
28+
spring.ai.mcp.server.protocol=STATELESS
2929
----
3030

3131
- Stateless operation with Spring MVC transport
@@ -45,7 +45,7 @@ Use the `spring-ai-starter-mcp-server-webflux` dependency:
4545
</dependency>
4646
----
4747

48-
and set the `spring.ai.mcp.server.protocol` property to `STATLESS`.
48+
and set the `spring.ai.mcp.server.protocol` property to `STATELESS`.
4949

5050
- Reactive stateless operation with WebFlux transport
5151
- No session state management
@@ -62,7 +62,7 @@ All Common properties are prefixed with `spring.ai.mcp.server`:
6262
|===
6363
|Property |Description |Default
6464
|`enabled` |Enable/disable the stateless MCP server |`true`
65-
|`protocol` |MCP server protocol | Must be set to `STATLESS` to enable the stateless server
65+
|`protocol` |MCP server protocol | Must be set to `STATELESS` to enable the stateless server
6666
|`tool-callback-converter` |Enable/disable the conversion of Spring AI ToolCallbacks into MCP Tool specs |`true`
6767
|`name` |Server name for identification |`mcp-server`
6868
|`version` |Server version |`1.0.0`

0 commit comments

Comments
 (0)