I am trying to avoid having an additional xml to define the mapper in mybatis3. Annotation fits right in.
I am a bit confused by the usage of @SelectProvider/@InsertProvider/etc. Don't think there are many resources online guiding me through this.
Basically, I will like to find the annotation version of alternative for in mybatis3.
For example, I have a xml mapper and I wanna convert it to use annotation
<select ...>
<where>
<if cause.....>
</if>
<if cause......>
</if>
</where>
</select>
Could anyone provide a concrete answer/solution including the code?
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…