Skip to content

Spring Integration 7.0 to 7.1 Migration Guide

Glenn Renfro edited this page Feb 2, 2026 · 5 revisions

TestUtils.getPropertyValue

Spring Integration 7.1 has updated the TestUtils.getPropertyValue() method to use generic type inference instead of requiring an explicit Class parameter.

What Changed

The three-parameter method signature: public static @Nullable T getPropertyValue(Object root, String propertyPath, Class type) has been deprecated in favor of the two-parameter generic method: public static @Nullable T getPropertyValue(Object root, String propertyPath)

Migration Path

Old code (deprecated):

LoadBalancingStrategy strategy = TestUtils.getPropertyValue(channel,     "dispatcher.loadBalancingStrategy", LoadBalancingStrategy.class);Boolean autoStartup = TestUtils.getPropertyValue(adapter,     "autoStartup", Boolean.class);

New code (recommended): Option 1: Type inference with variable assignment (preferred when possible)

LoadBalancingStrategy strategy = TestUtils.getPropertyValue(channel,     "dispatcher.loadBalancingStrategy");Boolean autoStartup = TestUtils.getPropertyValue(adapter, "autoStartup");
Option 2: Explicit generic type parameter (required in some contexts like assertions);
assertThat(TestUtils.<LoadBalancingStrategy>getPropertyValue(channel,     "dispatcher.loadBalancingStrategy"))    .isNotNull();Iterator<BlockingQueueConsumer> iterator =     TestUtils.<Set<BlockingQueueConsumer>>getPropertyValue(this.channel,         "container.consumers")    .iterator();

Clone this wiki locally