|
|
Performing Aritmatic using Spring
Hi,
Can I extract arithmetic calculations into my Spring file? For example if I require to divide field a of object a by field b of object a?
Thanks..
Though I do not know what you want to achieve with that, but I think it might be possible.
You can use MethodInvokingFactoryBean to execute methods performing calculations and you can use PropertyPathFactoryBean to navigate bean properties.
That said, I like to add the following:
- Direct access to (private) fields might be problematic
- Maybe using a script language for configuration (Spring supports this) might simplify the operation
Regards,
Andreas |
|