diff --git a/src/org/redkale/boot/ClassFilter.java b/src/org/redkale/boot/ClassFilter.java index 08aa9b47e..334f63cbd 100644 --- a/src/org/redkale/boot/ClassFilter.java +++ b/src/org/redkale/boot/ClassFilter.java @@ -5,7 +5,6 @@ */ package org.redkale.boot; -import org.redkale.util.Ignore; import org.redkale.util.AutoLoad; import org.redkale.util.AnyValue; import org.redkale.util.AnyValue.DefaultAnyValue; @@ -198,7 +197,6 @@ public final class ClassFilter { @SuppressWarnings("unchecked") public boolean accept(AnyValue property, Class clazz, boolean autoscan) { if (this.refused || !Modifier.isPublic(clazz.getModifiers())) return false; - if (clazz.getAnnotation(Ignore.class) != null) return false; if (autoscan) { AutoLoad auto = (AutoLoad) clazz.getAnnotation(AutoLoad.class); if (auto != null && !auto.value()) return false; diff --git a/src/org/redkale/service/CacheSourceService.java b/src/org/redkale/service/CacheSourceService.java index 7a2c8bcf7..497e8b5d3 100644 --- a/src/org/redkale/service/CacheSourceService.java +++ b/src/org/redkale/service/CacheSourceService.java @@ -14,6 +14,7 @@ import java.util.concurrent.*; import java.util.function.*; import java.util.logging.*; import javax.annotation.*; +import org.redkale.convert.*; import org.redkale.convert.json.*; import org.redkale.net.sncp.*; import org.redkale.source.*; @@ -445,17 +446,17 @@ public class CacheSourceService implem return JsonFactory.root().getConvert().convertTo(this); } - @Ignore + @ConvertColumn(ignore = true) public boolean isListCacheType() { return cacheType == CacheEntryType.LIST; } - @Ignore + @ConvertColumn(ignore = true) public boolean isSetCacheType() { return cacheType == CacheEntryType.SET; } - @Ignore + @ConvertColumn(ignore = true) public boolean isExpired() { return (expireSeconds > 0 && lastAccessed + expireSeconds < (System.currentTimeMillis() / 1000)); } diff --git a/src/org/redkale/source/FilterNodeBean.java b/src/org/redkale/source/FilterNodeBean.java index 22f436c31..09f406f4c 100644 --- a/src/org/redkale/source/FilterNodeBean.java +++ b/src/org/redkale/source/FilterNodeBean.java @@ -163,7 +163,6 @@ public final class FilterNodeBean implements Comparable> { for (final Field field : cltmp.getDeclaredFields()) { if (Modifier.isStatic(field.getModifiers())) continue; if (fields.contains(field.getName())) continue; - if (field.getAnnotation(Ignore.class) != null) continue; if (field.getAnnotation(Transient.class) != null) continue; final boolean pubmod = Modifier.isPublic(field.getModifiers()); diff --git a/src/org/redkale/util/Ignore.java b/src/org/redkale/util/Ignore.java deleted file mode 100644 index 4cf496944..000000000 --- a/src/org/redkale/util/Ignore.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package org.redkale.util; - -import java.lang.annotation.*; -import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -/** - * 用于忽略字段、方法或类。使用场景: - * 1、convert功能中被标记为@Ignore的字段或方法会被忽略 - * 2、FilterBean中的被标记为@Ignore的字段会被忽略 - * 3、被标记为@Ignore的Service类不会被自动加载 - * 4、被标记为@Ignore的Servlet类不会被自动加载 - * - *

详情见: http://www.redkale.org - * @author zhangjx - */ -@Inherited -@Documented -@Target({TYPE, FIELD, METHOD}) -@Retention(RUNTIME) -public @interface Ignore { - -}