diff --git a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/main/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfiguration.java b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/main/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfiguration.java index 81d588e928b..524785b3322 100644 --- a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/main/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfiguration.java +++ b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/main/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfiguration.java @@ -83,7 +83,7 @@ public class StreamableHttpWebFluxTransportAutoConfiguration { * @return list of named MCP transports */ @Bean - public List streamableHttpwebFluxClientTransports( + public List streamableHttpWebFluxClientTransports( McpStreamableHttpClientProperties streamableProperties, ObjectProvider webClientBuilderProvider, ObjectProvider objectMapperProvider) { diff --git a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/test/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfigurationTests.java b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/test/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfigurationTests.java index 170db687cd4..f22c2b2a2ea 100644 --- a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/test/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfigurationTests.java +++ b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux/src/test/java/org/springframework/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfigurationTests.java @@ -48,7 +48,7 @@ public class StreamableHttpWebFluxTransportAutoConfigurationTests { @Test void webFluxClientTransportsPresentIfWebClientStreamableHttpTransportPresent() { this.applicationContext - .run(context -> assertThat(context.containsBean("streamableHttpwebFluxClientTransports")).isTrue()); + .run(context -> assertThat(context.containsBean("streamableHttpWebFluxClientTransports")).isTrue()); } @Test @@ -56,19 +56,19 @@ void webFluxClientTransportsNotPresentIfMissingWebClientStreamableHttpTransportN this.applicationContext .withClassLoader(new FilteredClassLoader( "io.modelcontextprotocol.client.transport.WebClientStreamableHttpTransport")) - .run(context -> assertThat(context.containsBean("streamableHttpwebFluxClientTransports")).isFalse()); + .run(context -> assertThat(context.containsBean("streamableHttpWebFluxClientTransports")).isFalse()); } @Test void webFluxClientTransportsNotPresentIfMcpClientDisabled() { this.applicationContext.withPropertyValues("spring.ai.mcp.client.enabled", "false") - .run(context -> assertThat(context.containsBean("streamableHttpwebFluxClientTransports")).isFalse()); + .run(context -> assertThat(context.containsBean("streamableHttpWebFluxClientTransports")).isFalse()); } @Test void noTransportsCreatedWithEmptyConnections() { this.applicationContext.run(context -> { - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).isEmpty(); }); @@ -79,7 +79,7 @@ void singleConnectionCreatesOneTransport() { this.applicationContext .withPropertyValues("spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:8080") .run(context -> { - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(1); assertThat(transports.get(0).name()).isEqualTo("server1"); @@ -93,7 +93,7 @@ void multipleConnectionsCreateMultipleTransports() { .withPropertyValues("spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:8080", "spring.ai.mcp.client.streamable-http.connections.server2.url=http://otherserver:8081") .run(context -> { - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(2); assertThat(transports).extracting("name").containsExactlyInAnyOrder("server1", "server2"); @@ -113,7 +113,7 @@ void customStreamableHttpEndpointIsRespected() { .withPropertyValues("spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:8080", "spring.ai.mcp.client.streamable-http.connections.server1.endpoint=/custom-mcp") .run(context -> { - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(1); assertThat(transports.get(0).name()).isEqualTo("server1"); @@ -130,7 +130,7 @@ void customWebClientBuilderIsUsed() { .withPropertyValues("spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:8080") .run(context -> { assertThat(context.getBean(WebClient.Builder.class)).isNotNull(); - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(1); }); @@ -142,7 +142,7 @@ void customObjectMapperIsUsed() { .withPropertyValues("spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:8080") .run(context -> { assertThat(context.getBean(ObjectMapper.class)).isNotNull(); - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(1); }); @@ -153,7 +153,7 @@ void defaultStreamableHttpEndpointIsUsedWhenNotSpecified() { this.applicationContext .withPropertyValues("spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:8080") .run(context -> { - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(1); assertThat(transports.get(0).name()).isEqualTo("server1"); @@ -170,7 +170,7 @@ void mixedConnectionsWithAndWithoutCustomStreamableHttpEndpoint() { "spring.ai.mcp.client.streamable-http.connections.server1.endpoint=/custom-mcp", "spring.ai.mcp.client.streamable-http.connections.server2.url=http://otherserver:8081") .run(context -> { - List transports = context.getBean("streamableHttpwebFluxClientTransports", + List transports = context.getBean("streamableHttpWebFluxClientTransports", List.class); assertThat(transports).hasSize(2); assertThat(transports).extracting("name").containsExactlyInAnyOrder("server1", "server2");