This commit is contained in:
@@ -15,7 +15,7 @@ import org.redkale.convert.json.*;
|
|||||||
*/
|
*/
|
||||||
public class NotEmptyConstructorParamsBean {
|
public class NotEmptyConstructorParamsBean {
|
||||||
|
|
||||||
private int userid;
|
private final int userid;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@@ -26,11 +26,11 @@ public class NotEmptyConstructorParamsBean {
|
|||||||
this.userid = userid;
|
this.userid = userid;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
final JsonConvert jsonConvert = JsonFactory.root().getConvert();
|
final JsonConvert jsonConvert = JsonFactory.root().getConvert();
|
||||||
final BsonConvert bsonConvert = BsonFactory.root().getConvert();
|
final BsonConvert bsonConvert = BsonFactory.root().getConvert();
|
||||||
NotEmptyConstructorParamsBean bean = new NotEmptyConstructorParamsBean(12345678,"哈哈");
|
NotEmptyConstructorParamsBean bean = new NotEmptyConstructorParamsBean(12345678, "哈哈");
|
||||||
bean.setCreatetime(System.currentTimeMillis());
|
bean.setCreatetime(System.currentTimeMillis());
|
||||||
String json = jsonConvert.convertTo(bean);
|
String json = jsonConvert.convertTo(bean);
|
||||||
System.out.println(json);
|
System.out.println(json);
|
||||||
@@ -43,10 +43,6 @@ public class NotEmptyConstructorParamsBean {
|
|||||||
return userid;
|
return userid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserid(int userid) {
|
|
||||||
this.userid = userid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user