Skip to content

Commit 9085b2b

Browse files
committed
Polishing
1. Fix typo 2. Remove redundant `matchIfMissing = false` since it's default value Signed-off-by: Yanming Zhou <[email protected]>
1 parent 6880753 commit 9085b2b

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
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

0 commit comments

Comments
 (0)