Skip to content

Commit 0c96873

Browse files
committed
Clean code deprecations
Signed-off-by: Christian Tzolov <[email protected]>
1 parent fb5bf5f commit 0c96873

File tree

7 files changed

+7
-9
lines changed

7 files changed

+7
-9
lines changed

agents/reflection/src/main/java/org/springframework/ai/openai/samples/helloworld/Application.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
package org.springframework.ai.openai.samples.helloworld;
22

3-
import org.springframework.ai.chat.client.ChatClient;
3+
import java.util.Scanner;
4+
45
import org.springframework.boot.CommandLineRunner;
56
import org.springframework.boot.SpringApplication;
67
import org.springframework.boot.autoconfigure.SpringBootApplication;
78
import org.springframework.context.annotation.Bean;
89

9-
import java.util.Scanner;
10-
1110
@SpringBootApplication
1211
public class Application {
1312

model-context-protocol/mcp-annotations-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You can connect to the weather server using either STDIO or SSE transport:
140140
For servers using SSE transport:
141141

142142
```java
143-
var transport = new HttpClientSseClientTransport("http://localhost:8080");
143+
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
144144
var client = McpClient.sync(transport).build();
145145
```
146146

model-context-protocol/sampling/mcp-weather-webmvc-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ You can connect to the weather server using either STDIO or SSE transport:
166166
For servers using SSE transport:
167167

168168
```java
169-
var transport = new HttpClientSseClientTransport("http://localhost:8080");
169+
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
170170
var client = McpClient.sync(transport).build();
171171
```
172172

model-context-protocol/sampling/mcp-weather-webmvc-server/src/main/java/org/springframework/ai/mcp/sample/server/WeatherService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import java.time.LocalDateTime;
1919
import java.util.List;
2020

21-
import io.modelcontextprotocol.server.McpSyncServerExchange;
2221
import io.modelcontextprotocol.spec.McpSchema;
2322
import io.modelcontextprotocol.spec.McpSchema.CreateMessageResult;
2423
import io.modelcontextprotocol.spec.McpSchema.LoggingLevel;

model-context-protocol/sampling/mcp-weather-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/ClientSse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
public class ClientSse {
2525

2626
public static void main(String[] args) {
27-
var transport = new HttpClientSseClientTransport("http://localhost:8080");
27+
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
2828
new SampleClient(transport).run();
2929
}
3030

model-context-protocol/weather/starter-webmvc-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You can connect to the weather server using either STDIO or SSE transport:
140140
For servers using SSE transport:
141141

142142
```java
143-
var transport = new HttpClientSseClientTransport("http://localhost:8080");
143+
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
144144
var client = McpClient.sync(transport).build();
145145
```
146146

model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/ClientSse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
public class ClientSse {
2525

2626
public static void main(String[] args) {
27-
var transport = new HttpClientSseClientTransport("http://localhost:8080");
27+
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
2828
new SampleClient(transport).run();
2929
}
3030

0 commit comments

Comments
 (0)