This commit is contained in:
@@ -28,7 +28,8 @@ public class BsonTestMain {
|
|||||||
public static void main2(String[] args) throws Exception {
|
public static void main2(String[] args) throws Exception {
|
||||||
final BsonConvert convert = BsonFactory.root().getConvert();
|
final BsonConvert convert = BsonFactory.root().getConvert();
|
||||||
TestEntry2 entry = TestEntry2.create();
|
TestEntry2 entry = TestEntry2.create();
|
||||||
byte[] bytes = convert.convertTo(TestEntry2.class, entry);
|
byte[] bytes = convert.convertTo(TestEntry.class, entry);
|
||||||
|
System.out.println(Arrays.toString(bytes));
|
||||||
System.out.println(JsonFactory.root().getConvert().convertTo(entry));
|
System.out.println(JsonFactory.root().getConvert().convertTo(entry));
|
||||||
TestEntry rs = convert.convertFrom(TestEntry.class, bytes);
|
TestEntry rs = convert.convertFrom(TestEntry.class, bytes);
|
||||||
System.out.println(rs.toString());
|
System.out.println(rs.toString());
|
||||||
|
|||||||
@@ -5,12 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.wentch.redkale.test.convert;
|
package com.wentch.redkale.test.convert;
|
||||||
|
|
||||||
|
import com.wentch.redkale.convert.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
*/
|
*/
|
||||||
|
@ConvertEntity("myname")
|
||||||
public class TestEntry2 extends TestEntry {
|
public class TestEntry2 extends TestEntry {
|
||||||
|
|
||||||
private String extend;
|
private String extend;
|
||||||
|
|||||||
Reference in New Issue
Block a user