@Documented @Retention(value=RUNTIME) @Target(value=CONSTRUCTOR) public @interface AutomapConstructor
How to use:
public class User {
private int id;
private String name;
public User(int id) {
this.id = id;
}
@AutomapConstructor
public User(int id, String name) {
this.id = id;
this.name = name;
}
// ...
}
Copyright © 2009–2021 MyBatis.org. All rights reserved.