Polish "Use generic wildcard for Pulsar beans"
See gh-39308
This commit is contained in:
@@ -377,9 +377,10 @@ class PulsarAutoConfigurationTests {
|
|||||||
@Test
|
@Test
|
||||||
void injectsExpectedBeanWithExplicitGenericType() {
|
void injectsExpectedBeanWithExplicitGenericType() {
|
||||||
this.contextRunner.withBean(ExplicitGenericTypeConfig.class)
|
this.contextRunner.withBean(ExplicitGenericTypeConfig.class)
|
||||||
.run((context) -> assertThat(context).getBean(ExplicitGenericTypeConfig.class)
|
.run((context) -> assertThat(context).getBean(ExplicitGenericTypeConfig.class)
|
||||||
.hasFieldOrPropertyWithValue("consumerFactory", context.getBean(PulsarConsumerFactory.class))
|
.hasFieldOrPropertyWithValue("consumerFactory", context.getBean(PulsarConsumerFactory.class))
|
||||||
.hasFieldOrPropertyWithValue("containerFactory", context.getBean(ConcurrentPulsarListenerContainerFactory.class)));
|
.hasFieldOrPropertyWithValue("containerFactory",
|
||||||
|
context.getBean(ConcurrentPulsarListenerContainerFactory.class)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestConfiguration(proxyBeanMethods = false)
|
@TestConfiguration(proxyBeanMethods = false)
|
||||||
@@ -400,13 +401,17 @@ class PulsarAutoConfigurationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static class ExplicitGenericTypeConfig {
|
static class ExplicitGenericTypeConfig {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
PulsarConsumerFactory<TestType> consumerFactory;
|
PulsarConsumerFactory<TestType> consumerFactory;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ConcurrentPulsarListenerContainerFactory<TestType> containerFactory;
|
ConcurrentPulsarListenerContainerFactory<TestType> containerFactory;
|
||||||
|
|
||||||
static class TestType {}
|
static class TestType {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user