I am using Camel 2.13.1 I want to pass a class as parameter to one of my methods in the bean
Can I do something like
In Route
--
.beanRef("someSpringBeanRef","someMethod(${body},com.test.TestObject)")
--
And in Bean
public Object someMethod(String testBody, Class type){
I know I can send the qualified class name in header and use it within the bean but it doesn't feel too right. Are there any other alternatives?
I saw this link but it did not work for me Apache Camel - Spring DSL - Pass String argument to bean method
A method parameter of type Class
is not supported. From the Camel documentation:
Camel uses the following rules to determine if it's a parameter value in the method option