Clean code deprecations

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
Christian Tzolov
2025-05-10 08:26:30 +02:00
parent fb5bf5ffd8
commit 0c96873173
7 changed files with 7 additions and 9 deletions

View File

@@ -1,13 +1,12 @@
package org.springframework.ai.openai.samples.helloworld;
import org.springframework.ai.chat.client.ChatClient;
import java.util.Scanner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import java.util.Scanner;
@SpringBootApplication
public class Application {

View File

@@ -140,7 +140,7 @@ You can connect to the weather server using either STDIO or SSE transport:
For servers using SSE transport:
```java
var transport = new HttpClientSseClientTransport("http://localhost:8080");
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
var client = McpClient.sync(transport).build();
```

View File

@@ -166,7 +166,7 @@ You can connect to the weather server using either STDIO or SSE transport:
For servers using SSE transport:
```java
var transport = new HttpClientSseClientTransport("http://localhost:8080");
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
var client = McpClient.sync(transport).build();
```

View File

@@ -18,7 +18,6 @@ package org.springframework.ai.mcp.sample.server;
import java.time.LocalDateTime;
import java.util.List;
import io.modelcontextprotocol.server.McpSyncServerExchange;
import io.modelcontextprotocol.spec.McpSchema;
import io.modelcontextprotocol.spec.McpSchema.CreateMessageResult;
import io.modelcontextprotocol.spec.McpSchema.LoggingLevel;

View File

@@ -24,7 +24,7 @@ import io.modelcontextprotocol.client.transport.HttpClientSseClientTransport;
public class ClientSse {
public static void main(String[] args) {
var transport = new HttpClientSseClientTransport("http://localhost:8080");
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
new SampleClient(transport).run();
}

View File

@@ -140,7 +140,7 @@ You can connect to the weather server using either STDIO or SSE transport:
For servers using SSE transport:
```java
var transport = new HttpClientSseClientTransport("http://localhost:8080");
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
var client = McpClient.sync(transport).build();
```

View File

@@ -24,7 +24,7 @@ import io.modelcontextprotocol.client.transport.HttpClientSseClientTransport;
public class ClientSse {
public static void main(String[] args) {
var transport = new HttpClientSseClientTransport("http://localhost:8080");
var transport = HttpClientSseClientTransport.builder("http://localhost:8080").build();
new SampleClient(transport).run();
}