Package org.apache.ibatis.annotations
Annotation Type ConstructorArgs
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface ConstructorArgs
The annotation that be grouping mapping definitions for constructor.
How to use:public interface UserMapper { @ConstructorArgs({ @Arg(column = "id", javaType = int.class, id = true), @Arg(column = "name", javaType = String.class), @Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") }) @Select("SELECT id, name FROM users WHERE id = #{id}") User selectById(int id); }
- Author:
- Clinton Begin
-
-
Element Detail
-
value
Arg[] value
Returns mapping definitions for constructor.- Returns:
- mapping definitions
- Default:
- {}
-
-