<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>x.x.x</version>
</dependency>
public interface MySpiInterface {
void doSomething();
String process(String input);
}
@SPI("mySpiImplementation")
@Metadata(label = "custom")
public class MySpiImplementation implements MySpiInterface {
public void doSomething() {
}
public String process(String input) {
return "Processed: " + input;
}
}
properties
camel.spi.mySpiInterface = mySpiImplementation
from("direct:start")
.to("mySpiInterface:doSomething")
.to("mySpiInterface:process")
.to("log:result");