Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用编程配置进行了简单的 java 到 java 转换,效果很好。现在我需要用以下用例来扩展它,实际上它们都依赖于 MVEL 表达式。我找到了 Xml 配置的示例,因此解决方案可能如下所示:
<jb:expression property="underlying" execOnElement="__und"> mapper.lookup(__some/_field) </jb:expression>
但是如何通过编程配置(即使用Bean)来做到这一点?
以下为我工作(Smooks 1.5):
.bindTo("underlying", rmp.newBean(String.class, "__und", new MVELFactory<String>("mapping.lookup(__some/_field)")))