From 2d0cba2146f680828354864c4dbd253084ed6caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9C=B0=E5=B9=B3=E7=BA=BF?= <22250530@qq.com> Date: Sat, 27 Jun 2015 10:14:18 +0800 Subject: [PATCH] --- test/com/wentch/redkale/test/convert/BsonTestMain.java | 3 ++- test/com/wentch/redkale/test/convert/TestEntry2.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/com/wentch/redkale/test/convert/BsonTestMain.java b/test/com/wentch/redkale/test/convert/BsonTestMain.java index a46d6b598..8d2e68874 100644 --- a/test/com/wentch/redkale/test/convert/BsonTestMain.java +++ b/test/com/wentch/redkale/test/convert/BsonTestMain.java @@ -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()); diff --git a/test/com/wentch/redkale/test/convert/TestEntry2.java b/test/com/wentch/redkale/test/convert/TestEntry2.java index 2c26c4d38..311bdaf55 100644 --- a/test/com/wentch/redkale/test/convert/TestEntry2.java +++ b/test/com/wentch/redkale/test/convert/TestEntry2.java @@ -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;