You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Antonin Stefanutti (Jira)" <ji...@apache.org> on 2020/06/18 14:19:00 UTC
[jira] [Created] (CAMEL-15217) bean(Bean.class) should lookup the
registry by type
Antonin Stefanutti created CAMEL-15217:
------------------------------------------
Summary: bean(Bean.class) should lookup the registry by type
Key: CAMEL-15217
URL: https://issues.apache.org/jira/browse/CAMEL-15217
Project: Camel
Issue Type: Improvement
Components: came-core
Affects Versions: 3.3.0
Reporter: Antonin Stefanutti
While {{.bean("beanName")}} does lookup into the registry, {{.bean(Bean.class)}} does not and directly instantiates the provided class.
It would be more consistent to have it looking into the registry and return a bean reference if only one bean of the provided class is resolved. If the resolution is ambiguous or no beans match, an exception should be thrown.
This is also applicable to all {{.bean(Class, ...)}} methods.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)