From 7a30b3921134ccf7b2e76fbf554103895bf95b33 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Fri, 22 Sep 2023 10:05:23 -0400 Subject: [PATCH] Address deprecation warnings Remove the usage of deprecated `IntegrationFlows` in favor of `IntegrationFlow` --- .../cloud/fn/consumer/ftp/FtpConsumerConfiguration.java | 5 ++--- .../fn/consumer/jdbc/JdbcConsumerConfiguration.java | 5 ++--- .../cloud/fn/consumer/log/LogConsumerConfiguration.java | 5 ++--- .../fn/consumer/sftp/SftpConsumerConfiguration.java | 5 ++--- .../fn/supplier/file/FileSupplierConfiguration.java | 6 +++--- .../cloud/fn/supplier/ftp/FtpSupplierConfiguration.java | 6 +++--- .../fn/supplier/http/HttpSupplierConfiguration.java | 6 +++--- .../cloud/fn/supplier/jms/JmsSupplierConfiguration.java | 6 +++--- .../fn/supplier/mqtt/MqttSupplierConfiguration.java | 6 +++--- .../fn/supplier/rabbit/RabbitSupplierConfiguration.java | 6 +++--- .../fn/supplier/sftp/SftpSupplierConfiguration.java | 9 ++++----- .../cloud/fn/supplier/tcp/TcpSupplierConfiguration.java | 6 +++--- .../websocket/WebsocketSupplierConfiguration.java | 6 +++--- 13 files changed, 36 insertions(+), 41 deletions(-) diff --git a/functions/consumer/ftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/ftp/FtpConsumerConfiguration.java b/functions/consumer/ftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/ftp/FtpConsumerConfiguration.java index ece2d0a35..2aba1b60f 100644 --- a/functions/consumer/ftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/ftp/FtpConsumerConfiguration.java +++ b/functions/consumer/ftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/ftp/FtpConsumerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlowBuilder; -import org.springframework.integration.dsl.IntegrationFlows; import org.springframework.integration.file.remote.session.SessionFactory; import org.springframework.integration.ftp.dsl.Ftp; import org.springframework.integration.ftp.dsl.FtpMessageHandlerSpec; @@ -54,7 +53,7 @@ public IntegrationFlow ftpInboundFlow(FtpConsumerProperties properties, SessionF @Nullable ComponentCustomizer ftpMessageHandlerSpecCustomizer) { IntegrationFlowBuilder integrationFlowBuilder = - IntegrationFlows.from(MessageConsumer.class, (gateway) -> gateway.beanName("ftpConsumer")); + IntegrationFlow.from(MessageConsumer.class, (gateway) -> gateway.beanName("ftpConsumer")); FtpMessageHandlerSpec handlerSpec = Ftp.outboundAdapter(new FtpRemoteFileTemplate(ftpSessionFactory), properties.getMode()) diff --git a/functions/consumer/jdbc-consumer/src/main/java/org/springframework/cloud/fn/consumer/jdbc/JdbcConsumerConfiguration.java b/functions/consumer/jdbc-consumer/src/main/java/org/springframework/cloud/fn/consumer/jdbc/JdbcConsumerConfiguration.java index 7be4218ef..80ed10463 100644 --- a/functions/consumer/jdbc-consumer/src/main/java/org/springframework/cloud/fn/consumer/jdbc/JdbcConsumerConfiguration.java +++ b/functions/consumer/jdbc-consumer/src/main/java/org/springframework/cloud/fn/consumer/jdbc/JdbcConsumerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 the original author or authors. + * Copyright 2020-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,6 @@ import org.springframework.integration.config.AggregatorFactoryBean; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlowBuilder; -import org.springframework.integration.dsl.IntegrationFlows; import org.springframework.integration.expression.ExpressionUtils; import org.springframework.integration.expression.ValueExpression; import org.springframework.integration.jdbc.JdbcMessageHandler; @@ -130,7 +129,7 @@ IntegrationFlow jdbcConsumerFlow(@Qualifier("aggregator") MessageHandler aggrega JdbcMessageHandler jdbcMessageHandler) { final IntegrationFlowBuilder builder = - IntegrationFlows.from(Consumer.class, gateway -> gateway.beanName("jdbcConsumer")); + IntegrationFlow.from(Consumer.class, gateway -> gateway.beanName("jdbcConsumer")); if (properties.getBatchSize() > 1 || properties.getIdleTimeout() > 0) { builder.handle(aggregator); } diff --git a/functions/consumer/log-consumer/src/main/java/org/springframework/cloud/fn/consumer/log/LogConsumerConfiguration.java b/functions/consumer/log-consumer/src/main/java/org/springframework/cloud/fn/consumer/log/LogConsumerConfiguration.java index 3ae4913b8..ede6abaf0 100644 --- a/functions/consumer/log-consumer/src/main/java/org/springframework/cloud/fn/consumer/log/LogConsumerConfiguration.java +++ b/functions/consumer/log-consumer/src/main/java/org/springframework/cloud/fn/consumer/log/LogConsumerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2022 the original author or authors. + * Copyright 2020-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.integration.dsl.IntegrationFlow; -import org.springframework.integration.dsl.IntegrationFlows; import org.springframework.messaging.Message; /** @@ -41,7 +40,7 @@ public class LogConsumerConfiguration { @Bean IntegrationFlow logConsumerFlow(LogConsumerProperties logSinkProperties) { - return IntegrationFlows.from(MessageConsumer.class, (gateway) -> gateway.beanName("logConsumer")) + return IntegrationFlow.from(MessageConsumer.class, (gateway) -> gateway.beanName("logConsumer")) .log(logSinkProperties.getLevel(), logSinkProperties.getName(), logSinkProperties.getExpression()) .nullChannel(); } diff --git a/functions/consumer/sftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/sftp/SftpConsumerConfiguration.java b/functions/consumer/sftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/sftp/SftpConsumerConfiguration.java index 4c267b0bb..58a4018f3 100644 --- a/functions/consumer/sftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/sftp/SftpConsumerConfiguration.java +++ b/functions/consumer/sftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/sftp/SftpConsumerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import org.springframework.context.annotation.Import; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlowBuilder; -import org.springframework.integration.dsl.IntegrationFlows; import org.springframework.integration.file.remote.session.SessionFactory; import org.springframework.integration.sftp.dsl.Sftp; import org.springframework.integration.sftp.dsl.SftpMessageHandlerSpec; @@ -51,7 +50,7 @@ public IntegrationFlow ftpOutboundFlow(SftpConsumerProperties properties, @Nullable ComponentCustomizer sftpMessageHandlerSpecCustomizer) { IntegrationFlowBuilder integrationFlowBuilder = - IntegrationFlows.from(MessageConsumer.class, (gateway) -> gateway.beanName("sftpConsumer")); + IntegrationFlow.from(MessageConsumer.class, (gateway) -> gateway.beanName("sftpConsumer")); SftpMessageHandlerSpec handlerSpec = Sftp.outboundAdapter(new SftpRemoteFileTemplate(ftpSessionFactory), properties.getMode()) diff --git a/functions/supplier/file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/FileSupplierConfiguration.java b/functions/supplier/file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/FileSupplierConfiguration.java index 367687289..da8dfc4c9 100644 --- a/functions/supplier/file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/FileSupplierConfiguration.java +++ b/functions/supplier/file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/FileSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2022 the original author or authors. + * Copyright 2020-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +35,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Lazy; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlowBuilder; -import org.springframework.integration.dsl.IntegrationFlows; import org.springframework.integration.file.FileReadingMessageSource; import org.springframework.integration.file.dsl.FileInboundChannelAdapterSpec; import org.springframework.integration.file.dsl.Files; @@ -120,7 +120,7 @@ public Flux> fileMessageFlux() { @Bean @ConditionalOnExpression("environment['file.consumer.mode'] != 'ref'") public Publisher> fileReadingFlow() { - IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(fileMessageFlux()); + IntegrationFlowBuilder flowBuilder = IntegrationFlow.from(fileMessageFlux()); return FileUtils.enhanceFlowForReadingMode(flowBuilder, this.fileConsumerProperties) .toReactivePublisher(); } diff --git a/functions/supplier/ftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/ftp/FtpSupplierConfiguration.java b/functions/supplier/ftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/ftp/FtpSupplierConfiguration.java index c2a5ae8f4..58870a236 100644 --- a/functions/supplier/ftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/ftp/FtpSupplierConfiguration.java +++ b/functions/supplier/ftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/ftp/FtpSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Lazy; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.file.filters.ChainFileListFilter; import org.springframework.integration.file.remote.session.SessionFactory; import org.springframework.integration.ftp.dsl.Ftp; @@ -136,7 +136,7 @@ public Flux> ftpMessageFlux() { @Bean @ConditionalOnExpression("environment['file.consumer.mode'] != 'ref'") public Publisher> ftpReadingFlow(FtpInboundFileSynchronizingMessageSource ftpMessageSource) { - return FileUtils.enhanceFlowForReadingMode(IntegrationFlows + return FileUtils.enhanceFlowForReadingMode(IntegrationFlow .from(IntegrationReactiveUtils.messageSourceToFlux(ftpMessageSource)), fileConsumerProperties) .toReactivePublisher(); } diff --git a/functions/supplier/http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java b/functions/supplier/http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java index 43585f05e..2cbef92ab 100644 --- a/functions/supplier/http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java +++ b/functions/supplier/http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2021 the original author or authors. + * Copyright 2011-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.expression.ValueExpression; import org.springframework.integration.http.support.DefaultHttpHeaderMapper; import org.springframework.integration.mapping.HeaderMapper; @@ -60,7 +60,7 @@ public Publisher> httpSupplierFlow(HttpSupplierProperties httpSu HeaderMapper httpHeaderMapper, ServerCodecConfigurer serverCodecConfigurer) { - return IntegrationFlows.from( + return IntegrationFlow.from( WebFlux.inboundChannelAdapter(httpSupplierProperties.getPathPattern()) .requestPayloadType(byte[].class) .statusCodeExpression(new ValueExpression<>(HttpStatus.ACCEPTED)) diff --git a/functions/supplier/jms-supplier/src/main/java/org/springframework/cloud/fn/supplier/jms/JmsSupplierConfiguration.java b/functions/supplier/jms-supplier/src/main/java/org/springframework/cloud/fn/supplier/jms/JmsSupplierConfiguration.java index 335418bd0..d4e040a0d 100644 --- a/functions/supplier/jms-supplier/src/main/java/org/springframework/cloud/fn/supplier/jms/JmsSupplierConfiguration.java +++ b/functions/supplier/jms-supplier/src/main/java/org/springframework/cloud/fn/supplier/jms/JmsSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 the original author or authors. + * Copyright 2016-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.springframework.cloud.fn.common.config.ComponentCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.jms.dsl.Jms; import org.springframework.integration.jms.dsl.JmsMessageDrivenChannelAdapterSpec; import org.springframework.jms.listener.AbstractMessageListenerContainer; @@ -67,7 +67,7 @@ public Publisher> jmsPublisher( jmsMessageDrivenChannelAdapterSpecCustomizer.customize(messageProducerSpec); } - return IntegrationFlows.from(messageProducerSpec) + return IntegrationFlow.from(messageProducerSpec) .toReactivePublisher(true); } diff --git a/functions/supplier/mqtt-supplier/src/main/java/org/springframework/cloud/fn/supplier/mqtt/MqttSupplierConfiguration.java b/functions/supplier/mqtt-supplier/src/main/java/org/springframework/cloud/fn/supplier/mqtt/MqttSupplierConfiguration.java index 4b4cff953..82b1bc52c 100644 --- a/functions/supplier/mqtt-supplier/src/main/java/org/springframework/cloud/fn/supplier/mqtt/MqttSupplierConfiguration.java +++ b/functions/supplier/mqtt-supplier/src/main/java/org/springframework/cloud/fn/supplier/mqtt/MqttSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2022 the original author or authors. + * Copyright 2017-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.mqtt.core.MqttPahoClientFactory; import org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter; import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter; @@ -82,7 +82,7 @@ public MqttPahoMessageDrivenChannelAdapter mqttInbound( @Bean public Publisher> mqttPublisher(MqttPahoMessageDrivenChannelAdapter mqttInbound) { - return IntegrationFlows.from(mqttInbound) + return IntegrationFlow.from(mqttInbound) .toReactivePublisher(true); } diff --git a/functions/supplier/rabbit-supplier/src/main/java/org/springframework/cloud/fn/supplier/rabbit/RabbitSupplierConfiguration.java b/functions/supplier/rabbit-supplier/src/main/java/org/springframework/cloud/fn/supplier/rabbit/RabbitSupplierConfiguration.java index 0c3c8739a..c058e9af4 100644 --- a/functions/supplier/rabbit-supplier/src/main/java/org/springframework/cloud/fn/supplier/rabbit/RabbitSupplierConfiguration.java +++ b/functions/supplier/rabbit-supplier/src/main/java/org/springframework/cloud/fn/supplier/rabbit/RabbitSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 the original author or authors. + * Copyright 2016-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ import org.springframework.core.io.ResourceLoader; import org.springframework.integration.amqp.dsl.Amqp; import org.springframework.integration.amqp.dsl.AmqpInboundChannelAdapterSMLCSpec; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.retry.interceptor.RetryOperationsInterceptor; @@ -159,7 +159,7 @@ public Publisher> rabbitPublisher(SimpleMessageListenerContainer amqpMessageProducerCustomizer.customize(messageProducerSpec); } - return IntegrationFlows.from(messageProducerSpec) + return IntegrationFlow.from(messageProducerSpec) .toReactivePublisher(true); } diff --git a/functions/supplier/sftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/sftp/SftpSupplierConfiguration.java b/functions/supplier/sftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/sftp/SftpSupplierConfiguration.java index 67b118c80..31f82a324 100644 --- a/functions/supplier/sftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/sftp/SftpSupplierConfiguration.java +++ b/functions/supplier/sftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/sftp/SftpSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2021 the original author or authors. + * Copyright 2018-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,6 @@ import org.springframework.integration.core.MessageSource; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlowBuilder; -import org.springframework.integration.dsl.IntegrationFlows; import org.springframework.integration.endpoint.MessageProducerSupport; import org.springframework.integration.file.FileHeaders; import org.springframework.integration.file.filters.ChainFileListFilter; @@ -211,7 +210,7 @@ public Publisher> sftpReadingFlow( SftpSupplierProperties sftpSupplierProperties, FileConsumerProperties fileConsumerProperties) { - return FileUtils.enhanceStreamFlowForReadingMode(IntegrationFlows + return FileUtils.enhanceStreamFlowForReadingMode(IntegrationFlow .from(IntegrationReactiveUtils.messageSourceToFlux(sftpMessageSource) .delaySubscription(subscriptionBarrier) .contextWrite(Context.of(IntegrationReactiveUtils.DELAY_WHEN_EMPTY_KEY, @@ -258,7 +257,7 @@ public Publisher> sftpReadingFlow( FileConsumerProperties fileConsumerProperties, @Nullable MessageHandler renameRemoteFileHandler) { - IntegrationFlowBuilder flowBuilder = FileUtils.enhanceFlowForReadingMode(IntegrationFlows + IntegrationFlowBuilder flowBuilder = FileUtils.enhanceFlowForReadingMode(IntegrationFlow .from(IntegrationReactiveUtils.messageSourceToFlux(sftpMessageSource) .delaySubscription(subscriptionBarrier) .contextWrite(Context.of(IntegrationReactiveUtils.DELAY_WHEN_EMPTY_KEY, @@ -367,7 +366,7 @@ public IntegrationFlow listingFlow(MessageProducerSupport listingMessageProducer GenericSelector> duplicateFilter, GenericSelector listOnlyFilter) { - return IntegrationFlows.from(listingMessageProducer) + return IntegrationFlow.from(listingMessageProducer) .split() .transform(lsEntryToStringTransformer) .filter(duplicateFilter) diff --git a/functions/supplier/tcp-supplier/src/main/java/org/springframework/cloud/fn/supplier/tcp/TcpSupplierConfiguration.java b/functions/supplier/tcp-supplier/src/main/java/org/springframework/cloud/fn/supplier/tcp/TcpSupplierConfiguration.java index 8ad657e53..d5370ab0e 100644 --- a/functions/supplier/tcp-supplier/src/main/java/org/springframework/cloud/fn/supplier/tcp/TcpSupplierConfiguration.java +++ b/functions/supplier/tcp-supplier/src/main/java/org/springframework/cloud/fn/supplier/tcp/TcpSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import org.springframework.cloud.fn.common.tcp.TcpConnectionFactoryProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.ip.IpHeaders; import org.springframework.integration.ip.config.TcpConnectionFactoryFactoryBean; import org.springframework.integration.ip.tcp.TcpReceivingChannelAdapter; @@ -82,7 +82,7 @@ public TcpReceivingChannelAdapter adapter( @Bean public Publisher> tcpSupplierFlow(TcpReceivingChannelAdapter adapter) { - return IntegrationFlows.from(adapter) + return IntegrationFlow.from(adapter) .headerFilter(IpHeaders.LOCAL_ADDRESS) .toReactivePublisher(); } diff --git a/functions/supplier/websocket-supplier/src/main/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierConfiguration.java b/functions/supplier/websocket-supplier/src/main/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierConfiguration.java index 6156d9f6b..60fd80a17 100644 --- a/functions/supplier/websocket-supplier/src/main/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierConfiguration.java +++ b/functions/supplier/websocket-supplier/src/main/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2021 the original author or authors. + * Copyright 2018-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.websocket.IntegrationWebSocketContainer; import org.springframework.integration.websocket.ServerWebSocketContainer; import org.springframework.integration.websocket.inbound.WebSocketInboundChannelAdapter; @@ -58,7 +58,7 @@ public Supplier>> websocketSupplier(Publisher> websoc @Bean public Publisher> websocketPublisher(IntegrationWebSocketContainer serverWebSocketContainer) { - return IntegrationFlows.from( + return IntegrationFlow.from( webSocketInboundChannelAdapter(serverWebSocketContainer)) .toReactivePublisher(); }