CDI injected processor classes are not resolved as beans
Camel Version: 3.7.0 Intellij Version: 2021.1
@javax.inject.Named
class MyProcessor implements Processor {
}
@javax.inject.Named
class MyRouteBuilder extends RouteBuilder {
public void configure() throws Exception {
from("direct:myUri")
.process("myProcessor")
.end();
}
}
Intellij does not resolve myProcessor as an injected bean. It works when I annotate with Spring Component
There is a new 0.7.x plugin that is Camel 3 based, can you try with that
I tried the version 0.7.2 plugin and it does not fix the issue.
When you say Intellij do you mean that the Camel IDEA plugin should have done something or do you mean IDEA in general working with CDI?
I dont think we have jump to CDI beans as part of the IDEA plugin.
There is only special support when using beans EIP, eg
.bean(MyFooClass.class, "doSomething")
This should be part of the Camel IDEA plugin because invoking processors using processor names as a reference is specific to Camel.
When the Plugin can resolve a Camel processor which is a Spring component, why it cannot resolve a Named processor?
Having said that, the latest version of the plugin behaves the same for both Spring component processors and Named processors.
@ammachado you are welcome to look at this too
@davsclaus I wasn't aware of this issue, but I think that #947 fixes it.
okay 1.1.4 is released, try with that version