Improve the samples code

This commit is contained in:
Christian Tzolov 2025-01-09 16:48:36 +01:00
commit 6311794bcd

View file

@ -3,64 +3,45 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.experimental</groupId>
<artifactId>mcp-parent</artifactId>
<version>0.5.0-SNAPSHOT</version>
</parent>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-ai-mcp-sample</artifactId>
<name>Spring AI MCP Sample</name>
<version>0.5.0-SNAPSHOT</version>
<name>Spring AI MCP StdIO and WebFluxSSE Sample</name>
<description>Sample Spring Boot application demonstrating MCP server usage</description>
<properties>
<spring-boot.version>3.4.1</spring-boot.version>
<spring-ai-mcp.version>0.5.0-SNAPSHOT</spring-ai-mcp.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>mcp-webflux-sse-transport</artifactId>
<version>${project.version}</version>
<version>${spring-ai-mcp.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-ai-mcp</artifactId>
<version>${project.version}</version>
<version>${spring-ai-mcp.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot.version}</version>
</dependency> -->
<!-- Jetty Server-->
<!-- <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>11.0.15</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>11.0.15</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -69,8 +50,7 @@
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>