This commit is contained in:
地平线
2015-06-27 10:14:18 +08:00
parent 51041af3ce
commit 2d0cba2146
2 changed files with 4 additions and 1 deletions

View File

@@ -28,7 +28,8 @@ public class BsonTestMain {
public static void main2(String[] args) throws Exception {
final BsonConvert convert = BsonFactory.root().getConvert();
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));
TestEntry rs = convert.convertFrom(TestEntry.class, bytes);
System.out.println(rs.toString());

View File

@@ -5,12 +5,14 @@
*/
package com.wentch.redkale.test.convert;
import com.wentch.redkale.convert.*;
import java.util.*;
/**
*
* @author zhangjx
*/
@ConvertEntity("myname")
public class TestEntry2 extends TestEntry {
private String extend;