2525
2626import org .springframework .beans .factory .annotation .Autowired ;
2727import org .springframework .beans .factory .annotation .Qualifier ;
28- import org .springframework .context .ApplicationContext ;
2928import org .springframework .context .annotation .Bean ;
3029import org .springframework .context .annotation .Configuration ;
31- import org .springframework .context .expression .BeanFactoryResolver ;
32- import org .springframework .context .expression .MapAccessor ;
3330import org .springframework .data .redis .connection .ReactiveRedisConnectionFactory ;
3431import org .springframework .data .redis .connection .stream .ObjectRecord ;
3532import org .springframework .data .redis .connection .stream .StreamOffset ;
3633import org .springframework .data .redis .core .ReactiveRedisTemplate ;
3734import org .springframework .data .redis .serializer .RedisSerializationContext ;
38- import org .springframework .expression .spel .support .StandardEvaluationContext ;
3935import org .springframework .integration .channel .DirectChannel ;
36+ import org .springframework .integration .config .EnableIntegration ;
4037import org .springframework .integration .handler .ReactiveMessageHandlerAdapter ;
4138import org .springframework .integration .redis .RedisContainerTest ;
4239import org .springframework .integration .redis .util .Address ;
@@ -136,6 +133,7 @@ void testExplicitSerializationContextWithModel() {
136133 }
137134
138135 @ Configuration
136+ @ EnableIntegration
139137 public static class ReactiveRedisStreamMessageHandlerTestsContext {
140138
141139 @ Bean
@@ -144,15 +142,8 @@ ReactiveRedisConnectionFactory redisConnectionFactory() {
144142 }
145143
146144 @ Bean
147- public MessageChannel streamChannel (ReactiveMessageHandlerAdapter messageHandlerAdapter ) {
148- DirectChannel directChannel = new DirectChannel ();
149- directChannel .subscribe (messageHandlerAdapter );
150- directChannel .setMaxSubscribers (1 );
151- return directChannel ;
152- }
153-
154- @ Bean
155- public ReactiveRedisStreamMessageHandler streamMessageHandler (ReactiveRedisConnectionFactory redisConnectionFactory ) {
145+ public ReactiveRedisStreamMessageHandler streamMessageHandler (
146+ ReactiveRedisConnectionFactory redisConnectionFactory ) {
156147
157148 return new ReactiveRedisStreamMessageHandler (redisConnectionFactory , STREAM_KEY );
158149 }
@@ -165,11 +156,11 @@ public ReactiveMessageHandlerAdapter reactiveMessageHandlerAdapter(
165156 }
166157
167158 @ Bean
168- public StandardEvaluationContext integrationEvaluationContext ( ApplicationContext applicationContext ) {
169- StandardEvaluationContext integrationEvaluationContext = new StandardEvaluationContext ();
170- integrationEvaluationContext . addPropertyAccessor ( new MapAccessor () );
171- integrationEvaluationContext . setBeanResolver ( new BeanFactoryResolver ( applicationContext ) );
172- return integrationEvaluationContext ;
159+ public MessageChannel streamChannel ( ReactiveMessageHandlerAdapter messageHandlerAdapter ) {
160+ DirectChannel directChannel = new DirectChannel ();
161+ directChannel . subscribe ( messageHandlerAdapter );
162+ directChannel . setMaxSubscribers ( 1 );
163+ return directChannel ;
173164 }
174165
175166 }
0 commit comments