Open
Description
Hi,
I know that you are able to call static methods in My Batis Mapper XML files, but the manual, I think, doesn't explain the way directly. I'm afraid that some of my colleagues had troubled because they don't know that way.
Surely, the "Dynamic SQL" page explains like this.
MyBatis employs powerful OGNL based expressions to eliminate most of the other elements
, so it's make sense that you can call static methods using OGNL syntax, but its' not straightforward explanation.
I would like to suggest to add the below explanation to "Mapper XML Files" page. If you'd add the explanation to the page, it would be great.
You can call static methods and refer static fields like this,
calling a static method; @Class@method(args), e.g.
@org.apache.commons.lang3.StringUtils@isEmpty(data)
refering a static field: @Class@field, e.g.
@java.lang.Math@PI
Best regards,
Nobuyuki Inaba