Skip to content

Commit a607424

Browse files
committed
chore: fix typo
Signed-off-by: 虎鸣 <[email protected]>
1 parent c0bc623 commit a607424

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,19 @@ public List<McpSyncClient> mcpSyncClients(McpSyncClientConfigurer mcpSyncClientC
156156
this.connectedClientName(commonProperties.getName(), namedTransport.name()),
157157
commonProperties.getVersion());
158158

159-
McpClient.SyncSpec syncSpec = McpClient.sync(namedTransport.transport())
159+
McpClient.SyncSpec spec = McpClient.sync(namedTransport.transport())
160160
.clientInfo(clientInfo)
161161
.requestTimeout(commonProperties.getRequestTimeout());
162162

163-
syncSpec = mcpSyncClientConfigurer.configure(namedTransport.name(), syncSpec);
163+
spec = mcpSyncClientConfigurer.configure(namedTransport.name(), spec);
164164

165-
var syncClient = syncSpec.build();
165+
var client = spec.build();
166166

167167
if (commonProperties.isInitialized()) {
168-
syncClient.initialize();
168+
client.initialize();
169169
}
170170

171-
mcpSyncClients.add(syncClient);
171+
mcpSyncClients.add(client);
172172
}
173173
}
174174

@@ -212,7 +212,7 @@ public List<McpAsyncClient> mcpAsyncClients(McpAsyncClientConfigurer mcpSyncClie
212212
McpClientCommonProperties commonProperties,
213213
ObjectProvider<List<NamedClientMcpTransport>> transportsProvider) {
214214

215-
List<McpAsyncClient> mcpSyncClients = new ArrayList<>();
215+
List<McpAsyncClient> mcpAsyncClients = new ArrayList<>();
216216

217217
List<NamedClientMcpTransport> namedTransports = transportsProvider.stream().flatMap(List::stream).toList();
218218

@@ -223,23 +223,23 @@ public List<McpAsyncClient> mcpAsyncClients(McpAsyncClientConfigurer mcpSyncClie
223223
this.connectedClientName(commonProperties.getName(), namedTransport.name()),
224224
commonProperties.getVersion());
225225

226-
McpClient.AsyncSpec syncSpec = McpClient.async(namedTransport.transport())
226+
McpClient.AsyncSpec spec = McpClient.async(namedTransport.transport())
227227
.clientInfo(clientInfo)
228228
.requestTimeout(commonProperties.getRequestTimeout());
229229

230-
syncSpec = mcpSyncClientConfigurer.configure(namedTransport.name(), syncSpec);
230+
spec = mcpSyncClientConfigurer.configure(namedTransport.name(), spec);
231231

232-
var syncClient = syncSpec.build();
232+
var client = spec.build();
233233

234234
if (commonProperties.isInitialized()) {
235-
syncClient.initialize().block();
235+
client.initialize().block();
236236
}
237237

238-
mcpSyncClients.add(syncClient);
238+
mcpAsyncClients.add(client);
239239
}
240240
}
241241

242-
return mcpSyncClients;
242+
return mcpAsyncClients;
243243
}
244244

245245
@Bean

0 commit comments

Comments
 (0)