@Documented @Retention(value=RUNTIME) @Target(value=METHOD) @Repeatable(value=Select.List.class) public @interface Select
How to use:
public interface UserMapper {
@Select("SELECT id, name FROM users WHERE id = #{id}")
User selectById(int id);
}
| Modifier and Type | Required Element and Description |
|---|---|
String[] |
value
Returns an SQL for retrieving record(s).
|
| Modifier and Type | Optional Element and Description |
|---|---|
String |
databaseId |
Copyright © 2009–2021 MyBatis.org. All rights reserved.