Skip to content

Commit 0bd8ea5

Browse files
committed
Polish configuration metadata
Signed-off-by: Eddú Meléndez <[email protected]>
1 parent fbec267 commit 0bd8ea5

File tree

6 files changed

+34
-44
lines changed

6 files changed

+34
-44
lines changed

auto-configurations/mcp/spring-ai-autoconfigure-mcp-client/src/main/java/org/springframework/ai/mcp/client/autoconfigure/properties/McpClientCommonProperties.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,14 @@
2525
* all transport types.
2626
*
2727
* @author Christian Tzolov
28+
* @author Eddú Meléndez
2829
* @since 1.0.0
2930
*/
3031
@ConfigurationProperties(McpClientCommonProperties.CONFIG_PREFIX)
3132
public class McpClientCommonProperties {
3233

3334
public static final String CONFIG_PREFIX = "spring.ai.mcp.client";
3435

35-
/**
36-
* Enable/disable the MCP client.
37-
* <p>
38-
* When set to false, the MCP client and all its components will not be initialized.
39-
*/
40-
private boolean enabled = true;
41-
4236
/**
4337
* The name of the MCP client instance.
4438
* <p>
@@ -101,14 +95,6 @@ public enum ClientType {
10195
*/
10296
private boolean rootChangeNotification = true;
10397

104-
public boolean isEnabled() {
105-
return this.enabled;
106-
}
107-
108-
public void setEnabled(boolean enabled) {
109-
this.enabled = enabled;
110-
}
111-
11298
public String getName() {
11399
return this.name;
114100
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "spring.ai.mcp.client.enabled",
5+
"type": "java.lang.Boolean",
6+
"description": "Enable\/disable the MCP client. When set to false, the MCP client and all its components will not be initialized.",
7+
"defaultValue": true
8+
}
9+
]
10+
}

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* All properties are prefixed with {@code spring.ai.mcp.server}.
3636
*
3737
* @author Christian Tzolov
38+
* @author Eddú Meléndez
3839
* @since 1.0.0
3940
* @see McpServerAutoConfiguration
4041
*/
@@ -43,13 +44,6 @@ public class McpServerProperties {
4344

4445
public static final String CONFIG_PREFIX = "spring.ai.mcp.server";
4546

46-
/**
47-
* Enable/disable the MCP server.
48-
* <p>
49-
* When set to false, the MCP server and all its components will not be initialized.
50-
*/
51-
private boolean enabled = true;
52-
5347
/**
5448
* Enable/disable the standard input/output (stdio) transport.
5549
* <p>
@@ -146,14 +140,6 @@ public void setStdio(boolean stdio) {
146140
this.stdio = stdio;
147141
}
148142

149-
public boolean isEnabled() {
150-
return this.enabled;
151-
}
152-
153-
public void setEnabled(boolean enabled) {
154-
this.enabled = enabled;
155-
}
156-
157143
public String getName() {
158144
return this.name;
159145
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "spring.ai.mcp.server.enabled",
5+
"type": "java.lang.Boolean",
6+
"description": "Enable\/disable the MCP server. When set to false, the MCP server and all its components will not be initialized.",
7+
"defaultValue": true
8+
}
9+
]
10+
}

auto-configurations/models/chat/client/spring-ai-autoconfigure-model-chat-client/src/main/java/org/springframework/ai/model/chat/client/autoconfigure/ChatClientBuilderProperties.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,32 +25,20 @@
2525
* @author Mark Pollack
2626
* @author Josh Long
2727
* @author Arjen Poutsma
28+
* @author Eddú Meléndez
2829
* @since 1.0.0
2930
*/
3031
@ConfigurationProperties(ChatClientBuilderProperties.CONFIG_PREFIX)
3132
public class ChatClientBuilderProperties {
3233

3334
public static final String CONFIG_PREFIX = "spring.ai.chat.client";
3435

35-
/**
36-
* Enable chat client builder.
37-
*/
38-
private boolean enabled = true;
39-
4036
private Observations observations = new Observations();
4137

4238
public Observations getObservations() {
4339
return this.observations;
4440
}
4541

46-
public boolean isEnabled() {
47-
return this.enabled;
48-
}
49-
50-
public void setEnabled(boolean enabled) {
51-
this.enabled = enabled;
52-
}
53-
5442
public static class Observations {
5543

5644
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "spring.ai.chat.client.enabled",
5+
"type": "java.lang.Boolean",
6+
"description": "Enable chat client builder.",
7+
"defaultValue": true
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)