diff --git a/src/org/redkale/net/http/Rest.java b/src/org/redkale/net/http/Rest.java index c0111ec82..93c1d366b 100644 --- a/src/org/redkale/net/http/Rest.java +++ b/src/org/redkale/net/http/Rest.java @@ -127,9 +127,14 @@ public final class Rest { List types = new ArrayList<>(); for (RestConvert rc : converts) { if (types.contains(rc.type())) throw new RuntimeException("@RestConvert type(" + rc.type() + ") repeat"); - childFactory.register(rc.type(), false, rc.convertColumns()); - childFactory.register(rc.type(), true, rc.ignoreColumns()); - childFactory.reloadCoder(rc.type()); + if (rc.skipIgnore()) { + childFactory.registerSkipIgnore(rc.type()); + childFactory.reloadCoder(rc.type()); + } else { + childFactory.register(rc.type(), false, rc.convertColumns()); + childFactory.register(rc.type(), true, rc.ignoreColumns()); + childFactory.reloadCoder(rc.type()); + } types.add(rc.type()); childFactory.tiny(rc.tiny()); } diff --git a/src/org/redkale/net/http/RestConvert.java b/src/org/redkale/net/http/RestConvert.java index d948ebdac..4d12312cc 100644 --- a/src/org/redkale/net/http/RestConvert.java +++ b/src/org/redkale/net/http/RestConvert.java @@ -26,6 +26,8 @@ public @interface RestConvert { boolean tiny() default true; + boolean skipIgnore() default false; + Class type(); String[] ignoreColumns() default {};