How to set up route in java that uses bean references

前端 未结 1 1026
感动是毒
感动是毒 2020-12-22 11:21

I am trying to set up the following route:

  @Override
    public void configure() throws Exception {
        log.info(\"Creating ftp rout from \" + config.f         


        
相关标签:
1条回答
  • 2020-12-22 11:55

    Camel expects not only class references but bean instances.

    Assuming the classes have a default constructor, bind bean.clazz().newInstance() to the registry instead of bean.clazz(), i. e.:

    main.bind(bean.name(), bean.clazz().newInstance());
    
    0 讨论(0)
提交回复
热议问题