Question

I did simple java to java transformation with programmatic configuration and it worked well. Now I need to extend it with following use cases, actually all of them depend on MVEL expressions. I found examples with Xml configuration, so solution may look as follows:

   <jb:expression property="underlying" execOnElement="__und">
        mapper.lookup(__some/_field)
   </jb:expression>

But how to do it with programmatic configuration (i.e. using Bean)?

Was it helpful?

Solution

following worked for me (Smooks 1.5):

.bindTo("underlying", rmp.newBean(String.class, "__und",
    new MVELFactory<String>("mapping.lookup(__some/_field)")))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top