-
Notifications
You must be signed in to change notification settings - Fork 38.5k
ObjectFactory<List> with specified constructor args occurs error #29110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@qrqhuang Unfortunately, Spring Boot 4.3.x is out of OSS support. If you manage to reproduce the problem with a supported version, please share a small sample we can run ourselves and we can have a look. |
@snicoll Use spring 5.3.22, still the same error. model @Data
public class OrderContext {
private String orderNo;
} component @Component
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public class OrderTask {
private OrderContext orderContext;
public OrderTask(OrderContext orderContext) {
this.orderContext = orderContext;
}
} test case. should not throw error @Autowired
private ObjectProvider<List<OrderTask>> objectProviders;
@Test
void testProviders() {
OrderContext orderContext = new OrderContext();
orderContext.setOrderNo("222");
objectProviders.getObject(orderContext);
} |
I don't understand what you're trying to achieve with a |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
ObjectProvider
support a method to get bean with specified args. (#18529)But I have a collection beans to autowired, Use
ObjectProvider<List<T>>
, but now it looks like theargs
not effect, and throwNo qualifying bean
for constructor.spring version: 4.3.25.RELEASE
The text was updated successfully, but these errors were encountered: