From 4e5a03bb65c517e95028e130c1daa44322ead7c5 Mon Sep 17 00:00:00 2001 From: Redkale Date: Fri, 6 Jan 2023 12:47:12 +0800 Subject: [PATCH] =?UTF-8?q?Deprecated=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0s?= =?UTF-8?q?ince=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/javax/annotation/Priority.java | 4 +- src/main/java/javax/annotation/Resource.java | 2 +- .../java/javax/persistence/Cacheable.java | 2 +- src/main/java/javax/persistence/Column.java | 4 +- src/main/java/javax/persistence/Entity.java | 2 +- src/main/java/javax/persistence/Id.java | 4 +- src/main/java/javax/persistence/Index.java | 2 +- src/main/java/javax/persistence/Table.java | 2 +- .../java/javax/persistence/Transient.java | 4 +- .../javax/persistence/UniqueConstraint.java | 2 +- .../redkale/convert/json/JsonCharsWriter.java | 2 +- .../org/redkale/net/AsyncNioConnection.java | 4 +- src/main/java/org/redkale/net/Request.java | 4 +- .../org/redkale/net/http/HttpMapping.java | 4 +- .../org/redkale/net/http/HttpServlet.java | 4 +- .../java/org/redkale/persistence/Column.java | 13 +- .../java/org/redkale/service/RetLabel.java | 9 +- .../java/org/redkale/service/RetResult.java | 14 +- .../redkale/service/WebSocketNodeService.java | 10 +- .../java/org/redkale/source/CacheSource.java | 218 +++++++++--------- .../java/org/redkale/source/DataSources.java | 54 ++--- .../source/DistributeTableStrategy.java | 2 +- .../java/org/redkale/source/FilterNode.java | 6 +- .../java/org/redkale/source/SearchColumn.java | 2 +- .../org/redkale/source/VirtualEntity.java | 2 +- src/main/java/org/redkale/util/AutoLoad.java | 2 +- src/main/java/org/redkale/util/Bean.java | 4 +- src/main/java/org/redkale/util/Command.java | 4 +- src/main/java/org/redkale/util/Comment.java | 4 +- .../redkale/util/ConstructorParameters.java | 3 +- .../org/redkale/util/LogExcludeLevel.java | 4 +- src/main/java/org/redkale/util/LogLevel.java | 4 +- .../org/redkale/util/ResourceListener.java | 2 +- .../java/org/redkale/util/ResourceType.java | 2 +- src/main/java/org/redkale/util/Version.java | 3 +- 35 files changed, 195 insertions(+), 213 deletions(-) diff --git a/src/main/java/javax/annotation/Priority.java b/src/main/java/javax/annotation/Priority.java index 9401516a3..3de037a6f 100644 --- a/src/main/java/javax/annotation/Priority.java +++ b/src/main/java/javax/annotation/Priority.java @@ -22,10 +22,10 @@ import java.lang.annotation.*; * 值越大,优先级越高 * * @since Common Annotations 1.2 - * + * * @deprecated replace by org.redkale.annotation.Priority */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Priority { diff --git a/src/main/java/javax/annotation/Resource.java b/src/main/java/javax/annotation/Resource.java index c4d0b7202..8b22cf46e 100644 --- a/src/main/java/javax/annotation/Resource.java +++ b/src/main/java/javax/annotation/Resource.java @@ -12,7 +12,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.annotation.Resource */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface Resource { diff --git a/src/main/java/javax/persistence/Cacheable.java b/src/main/java/javax/persistence/Cacheable.java index fe33d6196..ebab895f5 100644 --- a/src/main/java/javax/persistence/Cacheable.java +++ b/src/main/java/javax/persistence/Cacheable.java @@ -35,7 +35,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.Cacheable */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({TYPE}) @Retention(RUNTIME) public @interface Cacheable { diff --git a/src/main/java/javax/persistence/Column.java b/src/main/java/javax/persistence/Column.java index 9b6503d83..0c2607c48 100644 --- a/src/main/java/javax/persistence/Column.java +++ b/src/main/java/javax/persistence/Column.java @@ -15,9 +15,9 @@ ***************************************************************************** */ package javax.persistence; -import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; +import static java.lang.annotation.ElementType.*; /** * Specifies the mapped column for a persistent property or field. @@ -49,7 +49,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.Column */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({METHOD, FIELD}) @Retention(RUNTIME) public @interface Column { diff --git a/src/main/java/javax/persistence/Entity.java b/src/main/java/javax/persistence/Entity.java index de8fd7209..5f004cfd7 100644 --- a/src/main/java/javax/persistence/Entity.java +++ b/src/main/java/javax/persistence/Entity.java @@ -27,7 +27,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.Entity */ -@Deprecated +@Deprecated(since = "2.8.0") @Inherited @Documented @Target(TYPE) diff --git a/src/main/java/javax/persistence/Id.java b/src/main/java/javax/persistence/Id.java index 5cb6feb74..e55f8bf67 100644 --- a/src/main/java/javax/persistence/Id.java +++ b/src/main/java/javax/persistence/Id.java @@ -15,9 +15,9 @@ ******************************************************************************/ package javax.persistence; -import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; +import static java.lang.annotation.ElementType.*; /** * Specifies the primary key of an entity. @@ -49,7 +49,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.Id */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({METHOD, FIELD}) @Retention(RUNTIME) diff --git a/src/main/java/javax/persistence/Index.java b/src/main/java/javax/persistence/Index.java index 10f2e1adf..561ff335a 100644 --- a/src/main/java/javax/persistence/Index.java +++ b/src/main/java/javax/persistence/Index.java @@ -41,7 +41,7 @@ import java.lang.annotation.*; * @deprecated replace by org.redkale.persistence.Index * */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({}) @Retention(RUNTIME) public @interface Index { diff --git a/src/main/java/javax/persistence/Table.java b/src/main/java/javax/persistence/Table.java index b02d2e1b9..b9ccc9e54 100644 --- a/src/main/java/javax/persistence/Table.java +++ b/src/main/java/javax/persistence/Table.java @@ -39,7 +39,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.Table */ -@Deprecated +@Deprecated(since = "2.8.0") @Target(TYPE) @Retention(RUNTIME) public @interface Table { diff --git a/src/main/java/javax/persistence/Transient.java b/src/main/java/javax/persistence/Transient.java index 449038fb3..d109abcd6 100644 --- a/src/main/java/javax/persistence/Transient.java +++ b/src/main/java/javax/persistence/Transient.java @@ -15,9 +15,9 @@ ******************************************************************************/ package javax.persistence; -import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; +import static java.lang.annotation.ElementType.*; /** * Specifies that the property or field is not persistent. It is used @@ -39,7 +39,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.Transient */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({METHOD, FIELD}) @Retention(RUNTIME) diff --git a/src/main/java/javax/persistence/UniqueConstraint.java b/src/main/java/javax/persistence/UniqueConstraint.java index 26f29d05a..0936b9b89 100644 --- a/src/main/java/javax/persistence/UniqueConstraint.java +++ b/src/main/java/javax/persistence/UniqueConstraint.java @@ -37,7 +37,7 @@ import java.lang.annotation.*; * * @deprecated replace by org.redkale.persistence.UniqueConstraint */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({}) @Retention(RUNTIME) public @interface UniqueConstraint { diff --git a/src/main/java/org/redkale/convert/json/JsonCharsWriter.java b/src/main/java/org/redkale/convert/json/JsonCharsWriter.java index c90a9f7b4..d04d1217b 100644 --- a/src/main/java/org/redkale/convert/json/JsonCharsWriter.java +++ b/src/main/java/org/redkale/convert/json/JsonCharsWriter.java @@ -20,7 +20,7 @@ import org.redkale.util.Utility; * * @deprecated 2.5.0 JDK9以上用byte[]代替char[]会有更好的性能 */ -@Deprecated +@Deprecated(since = "2.5.0") public class JsonCharsWriter extends JsonWriter { private static final char[] CHARS_TUREVALUE = "true".toCharArray(); diff --git a/src/main/java/org/redkale/net/AsyncNioConnection.java b/src/main/java/org/redkale/net/AsyncNioConnection.java index 309951de4..dbc303c69 100644 --- a/src/main/java/org/redkale/net/AsyncNioConnection.java +++ b/src/main/java/org/redkale/net/AsyncNioConnection.java @@ -483,10 +483,10 @@ abstract class AsyncNioConnection extends AsyncConnection { } } - @Deprecated //@since 2.5.0 + @Deprecated(since = "2.5.0") protected abstract ReadableByteChannel readableByteChannel(); - @Deprecated //@since 2.5.0 + @Deprecated(since = "2.5.0") protected abstract WritableByteChannel writableByteChannel(); protected InputStream newInputStream() { diff --git a/src/main/java/org/redkale/net/Request.java b/src/main/java/org/redkale/net/Request.java index 28969d606..b62930536 100644 --- a/src/main/java/org/redkale/net/Request.java +++ b/src/main/java/org/redkale/net/Request.java @@ -5,7 +5,7 @@ */ package org.redkale.net; -import java.io.*; +import java.io.InputStream; import java.nio.ByteBuffer; import java.util.*; import org.redkale.convert.ConvertDisabled; @@ -157,7 +157,7 @@ public abstract class Request { return this.context; } - @Deprecated //since 2.7.0 replace by getCreateTime() + @Deprecated(since = "2.7.0") //replace by getCreateTime() @ConvertDisabled public long getCreatetime() { return createTime; diff --git a/src/main/java/org/redkale/net/http/HttpMapping.java b/src/main/java/org/redkale/net/http/HttpMapping.java index c3ff535e0..43132674c 100644 --- a/src/main/java/org/redkale/net/http/HttpMapping.java +++ b/src/main/java/org/redkale/net/http/HttpMapping.java @@ -100,10 +100,10 @@ public @interface HttpMapping { /** * 输出结果的数据类型集合,由于结果类型可能是泛型而注解的参数值不支持泛型,因此加入明细数据类型集合 * - * @deprecated 2.5.0 + * @deprecated * @return Class[] */ - @Deprecated + @Deprecated(since = "2.5.0") Class[] results() default {}; /** diff --git a/src/main/java/org/redkale/net/http/HttpServlet.java b/src/main/java/org/redkale/net/http/HttpServlet.java index c708d4924..07fa08cea 100644 --- a/src/main/java/org/redkale/net/http/HttpServlet.java +++ b/src/main/java/org/redkale/net/http/HttpServlet.java @@ -28,10 +28,10 @@ import org.redkale.util.*; */ public class HttpServlet extends Servlet { - @Deprecated //@deprecated 2.8.0 + @Deprecated(since = "2.8.0") public static final int RET_SERVER_ERROR = 1200_0001; - @Deprecated //@deprecated 2.8.0 + @Deprecated(since = "2.8.0") public static final int RET_METHOD_ERROR = 1200_0002; String _actionSimpleMappingUrl; //只给HttpActionServlet使用,_actionSimpleMappingUrl不能包含正则表达式,比如 /json /createRecord, 不能是 /user/** diff --git a/src/main/java/org/redkale/persistence/Column.java b/src/main/java/org/redkale/persistence/Column.java index 527566b14..89e218148 100644 --- a/src/main/java/org/redkale/persistence/Column.java +++ b/src/main/java/org/redkale/persistence/Column.java @@ -15,11 +15,10 @@ ***************************************************************************** */ package org.redkale.persistence; -import java.lang.annotation.Target; -import java.lang.annotation.Retention; -import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.*; /** * Specifies the mapped column for a persistent property or field. @@ -110,14 +109,6 @@ public @interface Column { */ boolean updatable() default true; - /** - * (Optional) The name of the table that contains the column. - * If absent the column is assumed to be in the primary table. - * - * @return String - */ - @Deprecated - String table() default ""; /** * (Optional) The column length. (Applies only if a diff --git a/src/main/java/org/redkale/service/RetLabel.java b/src/main/java/org/redkale/service/RetLabel.java index 5ae14f68a..7f4569c7a 100644 --- a/src/main/java/org/redkale/service/RetLabel.java +++ b/src/main/java/org/redkale/service/RetLabel.java @@ -5,17 +5,16 @@ */ package org.redkale.service; -import org.redkale.util.RedkaleClassLoader; - import java.io.*; +import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.reflect.*; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.function.BiFunction; import static org.redkale.boot.Application.*; +import org.redkale.util.RedkaleClassLoader; /** * 用于定义错误码的注解
@@ -106,9 +105,5 @@ public @interface RetLabel { return rets; } -// @Deprecated -// public static Map load(Class clazz) { -// return loadMap(clazz).computeIfAbsent("", (k) -> new LinkedHashMap<>()); -// } } } diff --git a/src/main/java/org/redkale/service/RetResult.java b/src/main/java/org/redkale/service/RetResult.java index 3e3c7416c..009c74a51 100644 --- a/src/main/java/org/redkale/service/RetResult.java +++ b/src/main/java/org/redkale/service/RetResult.java @@ -51,7 +51,7 @@ public class RetResult implements Serializable { protected T result; @ConvertColumn(index = 5) - @Deprecated //@since 2.5.0 + @Deprecated(since = "2.5.0") protected Map attach; @ConvertDisabled @@ -228,7 +228,7 @@ public class RetResult implements Serializable { * * @return RetResult */ - @Deprecated + @Deprecated(since = "2.5.0") public RetResult attach(Map attach) { this.attach = attach; System.err.println("RetResult.attach is deprecated"); @@ -243,7 +243,7 @@ public class RetResult implements Serializable { * * @return RetResult */ - @Deprecated + @Deprecated(since = "2.5.0") public RetResult attach(String key, Object value) { System.err.println("RetResult.attach is deprecated"); if (this.attach == null) { @@ -260,7 +260,7 @@ public class RetResult implements Serializable { * * @return RetResult */ - @Deprecated + @Deprecated(since = "2.5.0") public RetResult clearAttach() { this.attach = null; return this; @@ -312,7 +312,7 @@ public class RetResult implements Serializable { * * @return 结果附件 */ - @Deprecated + @Deprecated(since = "2.5.0") public Map getAttach() { return attach; } @@ -322,7 +322,7 @@ public class RetResult implements Serializable { * * @param attach Map */ - @Deprecated + @Deprecated(since = "2.5.0") public void setAttach(Map attach) { this.attach = attach; } @@ -335,7 +335,7 @@ public class RetResult implements Serializable { * * @return 结果值 */ - @Deprecated + @Deprecated(since = "2.5.0") public String getAttach(String name, String defValue) { System.err.println("RetResult.attach is deprecated"); return attach == null ? defValue : attach.getOrDefault(name, defValue); diff --git a/src/main/java/org/redkale/service/WebSocketNodeService.java b/src/main/java/org/redkale/service/WebSocketNodeService.java index 2d9054e98..424d5dd23 100644 --- a/src/main/java/org/redkale/service/WebSocketNodeService.java +++ b/src/main/java/org/redkale/service/WebSocketNodeService.java @@ -6,11 +6,9 @@ package org.redkale.service; import java.util.logging.Level; - -import org.redkale.annotation.AutoLoad; -import org.redkale.annotation.ResourceType; -import org.redkale.net.http.*; -import org.redkale.util.*; +import org.redkale.annotation.*; +import org.redkale.net.http.WebSocketNode; +import org.redkale.util.AnyValue; /** * 由 org.redkale.net.http.WebSocketNodeService 代替 @@ -21,7 +19,7 @@ import org.redkale.util.*; * @deprecated 2.6.0 * @author zhangjx */ -@Deprecated +@Deprecated(since = "2.6.0") @AutoLoad(false) @ResourceType(WebSocketNode.class) public class WebSocketNodeService extends org.redkale.net.http.WebSocketNodeService { diff --git a/src/main/java/org/redkale/source/CacheSource.java b/src/main/java/org/redkale/source/CacheSource.java index d5517bcdc..a3e42a015 100644 --- a/src/main/java/org/redkale/source/CacheSource.java +++ b/src/main/java/org/redkale/source/CacheSource.java @@ -300,34 +300,34 @@ public interface CacheSource extends Resourcable { public long dbsize(); //------------------------ collection ------------------------ - @Deprecated + @Deprecated(since = "2.8.0") public Collection getCollection(final String key, final Type componentType); - @Deprecated + @Deprecated(since = "2.8.0") public Map> getCollectionMap(final boolean set, final Type componentType, final String... keys); - @Deprecated + @Deprecated(since = "2.8.0") public int getCollectionSize(final String key); - @Deprecated + @Deprecated(since = "2.8.0") public Collection getexCollection(final String key, final int expireSeconds, final Type componentType); - @Deprecated + @Deprecated(since = "2.8.0") public Map> getStringCollectionMap(final boolean set, final String... keys); - @Deprecated + @Deprecated(since = "2.8.0") public Collection getStringCollection(final String key); - @Deprecated + @Deprecated(since = "2.8.0") public Collection getexStringCollection(final String key, final int expireSeconds); - @Deprecated + @Deprecated(since = "2.8.0") public Collection getLongCollection(final String key); - @Deprecated + @Deprecated(since = "2.8.0") public Map> getLongCollectionMap(final boolean set, final String... keys); - @Deprecated + @Deprecated(since = "2.8.0") public Collection getexLongCollection(final String key, final int expireSeconds); //---------------------- CompletableFuture 异步版 --------------------------------- @@ -601,478 +601,478 @@ public interface CacheSource extends Resourcable { public CompletableFuture dbsizeAsync(); //------------------------ collectionAsync ------------------------ - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture> getCollectionAsync(final String key, final Type componentType); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture>> getCollectionMapAsync(final boolean set, final Type componentType, final String... keys); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture getCollectionSizeAsync(final String key); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture> getexCollectionAsync(final String key, final int expireSeconds, final Type componentType); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture> getStringCollectionAsync(final String key); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture>> getStringCollectionMapAsync(final boolean set, final String... keys); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture> getexStringCollectionAsync(final String key, final int expireSeconds); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture> getLongCollectionAsync(final String key); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture>> getLongCollectionMapAsync(final boolean set, final String... keys); - @Deprecated + @Deprecated(since = "2.8.0") public CompletableFuture> getexLongCollectionAsync(final String key, final int expireSeconds); //-------------------------- 过期方法 ---------------------------------- - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture refreshAsync(final String key, final int expireSeconds) { return expireAsync(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture hremoveAsync(final String key, String... fields) { return hdelAsync(key, fields); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture setAsync(final int expireSeconds, final String key, final Convert convert, final T value) { return setexAsync(key, expireSeconds, convert, value.getClass(), value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture setAsync(final int expireSeconds, final String key, final Type type, final T value) { return setexAsync(key, expireSeconds, type, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture setAsync(final int expireSeconds, final String key, final Convert convert, final Type type, final T value) { return setexAsync(key, expireSeconds, convert, type, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture setExpireSecondsAsync(final String key, final int expireSeconds) { return expireAsync(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeAsync(final String key) { return delAsync(key); } - @Deprecated + @Deprecated(since = "2.8.0") default int hremove(final String key, String... fields) { return hdel(key, fields); } - @Deprecated + @Deprecated(since = "2.8.0") default void refresh(final String key, final int expireSeconds) { expire(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default void set(final int expireSeconds, final String key, final Convert convert, final T value) { setex(key, expireSeconds, convert, value.getClass(), value); } - @Deprecated + @Deprecated(since = "2.8.0") default void set(final int expireSeconds, final String key, final Type type, final T value) { setex(key, expireSeconds, type, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void set(final int expireSeconds, final String key, final Convert convert, final Type type, final T value) { setex(key, expireSeconds, convert, type, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void setExpireSeconds(final String key, final int expireSeconds) { expire(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default int remove(final String key) { return del(key); } - @Deprecated + @Deprecated(since = "2.8.0") default void setString(final int expireSeconds, final String key, final String value) { setexString(key, expireSeconds, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void setLong(final int expireSeconds, final String key, final long value) { setexLong(key, expireSeconds, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void setBytes(final int expireSeconds, final String key, final byte[] value) { setexBytes(key, expireSeconds, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getAndRefreshAsync(final String key, final int expireSeconds, final Type type) { return getexAsync(key, expireSeconds, type); } - @Deprecated + @Deprecated(since = "2.8.0") default T getAndRefresh(final String key, final int expireSeconds, final Type type) { return getex(key, expireSeconds, type); } - @Deprecated + @Deprecated(since = "2.8.0") default String getStringAndRefresh(final String key, final int expireSeconds) { return getexString(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default long getLongAndRefresh(final String key, final int expireSeconds, long defValue) { return getexLong(key, expireSeconds, defValue); } - @Deprecated + @Deprecated(since = "2.8.0") default byte[] getBytesAndRefresh(final String key, final int expireSeconds) { return getexBytes(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getLongAndRefreshAsync(final String key, final int expireSeconds, long defValue) { return getexLongAsync(key, expireSeconds, defValue); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getStringAndRefreshAsync(final String key, final int expireSeconds) { return getexStringAsync(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getBytesAndRefreshAsync(final String key, final int expireSeconds) { return getexBytesAsync(key, expireSeconds); } - @Deprecated + @Deprecated(since = "2.8.0") default int hsize(final String key) { return hlen(key); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture hsizeAsync(final String key) { return hlenAsync(key); } - @Deprecated + @Deprecated(since = "2.8.0") default void appendSetItem(final String key, final Type componentType, final T value) { sadd(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default int removeSetItem(final String key, final Type componentType, final T value) { return srem(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default T spopSetItem(final String key, final Type componentType) { return CacheSource.this.spop(key, componentType); } - @Deprecated + @Deprecated(since = "2.8.0") default Set spopSetItem(final String key, final int count, final Type componentType) { return spop(key, count, componentType); } - @Deprecated + @Deprecated(since = "2.8.0") default boolean existsSetItem(final String key, final Type componentType, final T value) { return sismember(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture existsSetItemAsync(final String key, final Type componentType, final T value) { return sismemberAsync(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture appendSetItemAsync(final String key, final Type componentType, final T value) { return saddAsync(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeSetItemAsync(final String key, final Type componentType, final T value) { return sremAsync(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture spopSetItemAsync(final String key, final Type componentType) { return spopAsync(key, componentType); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> spopSetItemAsync(final String key, final int count, final Type componentType) { return spopAsync(key, count, componentType); } - @Deprecated + @Deprecated(since = "2.8.0") default boolean existsStringSetItem(final String key, final String value) { return sismemberString(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void appendStringSetItem(final String key, final String value) { saddString(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default int removeStringSetItem(final String key, final String value) { return sremString(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default String spopStringSetItem(final String key) { return spopString(key); } - @Deprecated + @Deprecated(since = "2.8.0") default Set spopStringSetItem(final String key, final int count) { return spopString(key, count); } - @Deprecated + @Deprecated(since = "2.8.0") default boolean existsLongSetItem(final String key, final long value) { return sismemberLong(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void appendLongSetItem(final String key, final long value) { saddLong(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default int removeLongSetItem(final String key, final long value) { return sremLong(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default Long spopLongSetItem(final String key) { return spopLong(key); } - @Deprecated + @Deprecated(since = "2.8.0") default Set spopLongSetItem(final String key, final int count) { return spopLong(key, count); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture existsStringSetItemAsync(final String key, final String value) { return sismemberStringAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture appendStringSetItemAsync(final String key, final String value) { return saddStringAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeStringSetItemAsync(final String key, final String value) { return sremStringAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture spopStringSetItemAsync(final String key) { return spopStringAsync(key); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> spopStringSetItemAsync(final String key, final int count) { return spopStringAsync(key, count); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture existsLongSetItemAsync(final String key, final long value) { return sismemberLongAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture appendLongSetItemAsync(final String key, final long value) { return saddLongAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeLongSetItemAsync(final String key, final long value) { return sremLongAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture spopLongSetItemAsync(final String key) { return spopLongAsync(key); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> spopLongSetItemAsync(final String key, final int count) { return spopLongAsync(key, count); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture appendListItemAsync(final String key, final Type componentType, final T value) { return rpushAsync(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeListItemAsync(final String key, final Type componentType, final T value) { return lremAsync(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture appendStringListItemAsync(final String key, final String value) { return rpushStringAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeStringListItemAsync(final String key, final String value) { return lremStringAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture appendLongListItemAsync(final String key, final long value) { return rpushLongAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture removeLongListItemAsync(final String key, final long value) { return lremLongAsync(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void appendListItem(final String key, final Type componentType, final T value) { rpush(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default int removeListItem(final String key, final Type componentType, final T value) { return lrem(key, componentType, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void appendStringListItem(final String key, final String value) { rpushString(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default int removeStringListItem(final String key, final String value) { return lremString(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default void appendLongListItem(final String key, final long value) { rpushLong(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default int removeLongListItem(final String key, final long value) { return lremLong(key, value); } - @Deprecated + @Deprecated(since = "2.8.0") default List queryKeys() { return keys(); } - @Deprecated + @Deprecated(since = "2.8.0") default List queryKeysStartsWith(String startsWith) { return keys(startsWith + "*"); } - @Deprecated + @Deprecated(since = "2.8.0") default List queryKeysEndsWith(String endsWith) { return keys("*" + endsWith); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> queryKeysAsync() { return keysAsync(); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> queryKeysStartsWithAsync(String startsWith) { return keysAsync(startsWith + "*"); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> queryKeysEndsWithAsync(String endsWith) { return keysAsync("*" + endsWith); } - @Deprecated + @Deprecated(since = "2.8.0") default Map getMap(final Type componentType, final String... keys) { return mget(componentType, keys); } - @Deprecated + @Deprecated(since = "2.8.0") default Map getStringMap(final String... keys) { return mgetString(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default Map getLongMap(final String... keys) { return mgetLong(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> getMapAsync(final Type componentType, final String... keys) { return mgetAsync(componentType, keys); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> getStringMapAsync(final String... keys) { return mgetStringAsync(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture> getLongMapAsync(final String... keys) { return mgetLongAsync(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default long incr(final String key, long num) { return incrby(key, num); } - @Deprecated + @Deprecated(since = "2.8.0") default long decr(final String key, long num) { return decrby(key, num); } - @Deprecated + @Deprecated(since = "2.8.0") default String[] getStringArray(final String... keys) { return mgetsString(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default Long[] getLongArray(final String... keys) { return mgetsLong(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getStringArrayAsync(final String... keys) { return mgetsStringAsync(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getLongArrayAsync(final String... keys) { return mgetsLongAsync(keys); } - @Deprecated + @Deprecated(since = "2.8.0") default CompletableFuture getKeySizeAsync() { return dbsizeAsync().thenApply(v -> v.intValue()); } - @Deprecated + @Deprecated(since = "2.8.0") default int getKeySize() { return (int) dbsize(); } diff --git a/src/main/java/org/redkale/source/DataSources.java b/src/main/java/org/redkale/source/DataSources.java index ae72ea863..a61c5de2b 100644 --- a/src/main/java/org/redkale/source/DataSources.java +++ b/src/main/java/org/redkale/source/DataSources.java @@ -15,64 +15,64 @@ import org.redkale.util.*; * * @author zhangjx */ -@Deprecated //@deprecated @since 2.7.0 +@Deprecated(since = "2.7.0") public final class DataSources { - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String DATASOURCE_CONFPATH = "DATASOURCE_CONFPATH"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_DATASOURCE_CLASS = "javax.persistence.datasource"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_TABLE_AUTODDL = "javax.persistence.table.autoddl"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_CACHE_MODE = "javax.persistence.cachemode"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_CONNECTIONS_LIMIT = "javax.persistence.connections.limit"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_CONNECTIONSCAPACITY = "javax.persistence.connections.bufcapacity"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_CONTAIN_SQLTEMPLATE = "javax.persistence.contain.sqltemplate"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_NOTCONTAIN_SQLTEMPLATE = "javax.persistence.notcontain.sqltemplate"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_TABLENOTEXIST_SQLSTATES = "javax.persistence.tablenotexist.sqlstates"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_TABLECOPY_SQLTEMPLATE = "javax.persistence.tablecopy.sqltemplate"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_CONNECTTIMEOUT_SECONDS = "javax.persistence.connecttimeout"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_READTIMEOUT_SECONDS = "javax.persistence.readtimeout"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_WRITETIMEOUT_SECONDS = "javax.persistence.writetimeout"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_URL = "javax.persistence.jdbc.url"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_USER = "javax.persistence.jdbc.user"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_PWD = "javax.persistence.jdbc.password"; - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") private static final String JDBC_ENCODING = "javax.persistence.jdbc.encoding"; - @Deprecated //@deprecated @since 2.5.0 + @Deprecated(since = "2.5.0") private static final String JDBC_DRIVER = "javax.persistence.jdbc.driver"; - @Deprecated //@deprecated @since 2.5.0 + @Deprecated(since = "2.5.0") private static final String JDBC_SOURCE = "javax.persistence.jdbc.source"; //@since 2.4.0 for SearchSource default value: true @@ -81,7 +81,7 @@ public final class DataSources { private DataSources() { } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static DataSource createDataSource(final String unitName, final AnyValue conf) throws IOException { Properties prop = new Properties(); AnyValue[] confs = conf.getAnyValues("property"); @@ -97,17 +97,17 @@ public final class DataSources { return createDataSource(unitName, prop, prop); } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static DataSource createDataSource(final String unitName, Properties prop) throws IOException { return createDataSource(unitName, prop, prop); } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static DataSource createDataSource(final String unitName, Properties readprop, Properties writeprop) throws IOException { return createDataSource(unitName, null, readprop, writeprop); } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static DataSource createDataSource(final String unitName, URL persistxml, Properties readprop, Properties writeprop) throws IOException { throw new UnsupportedOperationException("Not supported yet."); // String impl = readprop.getProperty(JDBC_DATASOURCE_CLASS, DataJdbcSource.class.getName()); @@ -182,14 +182,14 @@ public final class DataSources { // } } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static DataSource createDataSource(final String confURI, final String unitName) throws IOException { return createDataSource(unitName, System.getProperty(DATASOURCE_CONFPATH, "").isEmpty() ? RedkaleClassLoader.getConfResourceAsURI(confURI, "persistence.xml").toURL() : (System.getProperty(DATASOURCE_CONFPATH, "").contains("://") ? URI.create(System.getProperty(DATASOURCE_CONFPATH)).toURL() : new File(System.getProperty(DATASOURCE_CONFPATH)).toURI().toURL())); } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static DataSource createDataSource(final String unitName, URL persistxml) throws IOException { if (persistxml == null) { persistxml = DataSources.class.getResource("/persistence.xml"); @@ -302,7 +302,7 @@ public final class DataSources { return key; } - @Deprecated //@deprecated @since 2.7.0 + @Deprecated(since = "2.7.0") public static Map loadPersistenceXml(final InputStream in0) { final Map map = new TreeMap<>(); try (final InputStream in = in0) { diff --git a/src/main/java/org/redkale/source/DistributeTableStrategy.java b/src/main/java/org/redkale/source/DistributeTableStrategy.java index 5f5b5953f..92701a861 100644 --- a/src/main/java/org/redkale/source/DistributeTableStrategy.java +++ b/src/main/java/org/redkale/source/DistributeTableStrategy.java @@ -54,7 +54,7 @@ public interface DistributeTableStrategy { * * @return 带库名的全表名 */ - @Deprecated + @Deprecated(since = "2.8.0") default String getTable(String table, FilterNode node) { return getTables(table, node)[0]; } diff --git a/src/main/java/org/redkale/source/FilterNode.java b/src/main/java/org/redkale/source/FilterNode.java index 6231e82d7..ed2cd7111 100644 --- a/src/main/java/org/redkale/source/FilterNode.java +++ b/src/main/java/org/redkale/source/FilterNode.java @@ -347,17 +347,17 @@ public class FilterNode { //FilterNode 不能实现Serializable接口, 否则 return new FilterNode(column, express, itemand, value); } - @Deprecated //@deprecated @since 2.8.0 + @Deprecated(since = "2.8.0") public static FilterNode filter(String column, Serializable value) { return create(column, null, value); } - @Deprecated //@deprecated @since 2.8.0 + @Deprecated(since = "2.8.0") public static FilterNode filter(String column, FilterExpress express, Serializable value) { return create(column, express, true, value); } - @Deprecated //@deprecated @since 2.8.0 + @Deprecated(since = "2.8.0") public static FilterNode filter(String column, FilterExpress express, boolean itemand, Serializable value) { return new FilterNode(column, express, itemand, value); } diff --git a/src/main/java/org/redkale/source/SearchColumn.java b/src/main/java/org/redkale/source/SearchColumn.java index 817f07dff..9fd38298b 100644 --- a/src/main/java/org/redkale/source/SearchColumn.java +++ b/src/main/java/org/redkale/source/SearchColumn.java @@ -21,7 +21,7 @@ import java.lang.annotation.*; * * @deprecated replaced by org.redkale.persistence.SearchColumn */ -@Deprecated +@Deprecated(since = "2.8.0") @Target({FIELD}) @Retention(RUNTIME) public @interface SearchColumn { diff --git a/src/main/java/org/redkale/source/VirtualEntity.java b/src/main/java/org/redkale/source/VirtualEntity.java index 68915cecf..e97bbb719 100644 --- a/src/main/java/org/redkale/source/VirtualEntity.java +++ b/src/main/java/org/redkale/source/VirtualEntity.java @@ -21,7 +21,7 @@ import java.util.function.BiFunction; * @author zhangjx * @deprecated replaced by org.redkale.persistence.VirtualEntity */ -@Deprecated +@Deprecated(since = "2.8.0") @Documented @Target(TYPE) @Retention(RUNTIME) diff --git a/src/main/java/org/redkale/util/AutoLoad.java b/src/main/java/org/redkale/util/AutoLoad.java index 05b900511..9c2612bf5 100644 --- a/src/main/java/org/redkale/util/AutoLoad.java +++ b/src/main/java/org/redkale/util/AutoLoad.java @@ -18,7 +18,7 @@ import java.lang.annotation.*; * @author zhangjx * @deprecated replaced by org.redkale.annotation.AutoLoad */ -@Deprecated +@Deprecated(since = "2.8.0") @Documented @Target({TYPE}) @Retention(RUNTIME) diff --git a/src/main/java/org/redkale/util/Bean.java b/src/main/java/org/redkale/util/Bean.java index 539c37e5b..7c0e2a967 100644 --- a/src/main/java/org/redkale/util/Bean.java +++ b/src/main/java/org/redkale/util/Bean.java @@ -5,16 +5,16 @@ */ package org.redkale.util; -import java.lang.annotation.*; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.*; /** * 标记参数bean * * @since 2.5.0 */ -@Deprecated +@Deprecated(since = "2.8.0") @Inherited @Documented @Target(TYPE) diff --git a/src/main/java/org/redkale/util/Command.java b/src/main/java/org/redkale/util/Command.java index 59b375be7..bfd2fbc11 100644 --- a/src/main/java/org/redkale/util/Command.java +++ b/src/main/java/org/redkale/util/Command.java @@ -5,9 +5,9 @@ */ package org.redkale.util; +import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * 接收命令的标记, 只能标记在本地模式下Service里参数为(String)或(String, String[])的public方法上 @@ -19,7 +19,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @since 2.1.0 */ -@Deprecated +@Deprecated(since = "2.8.0") @Inherited @Documented @Target({METHOD}) diff --git a/src/main/java/org/redkale/util/Comment.java b/src/main/java/org/redkale/util/Comment.java index c83160ea2..961326c90 100644 --- a/src/main/java/org/redkale/util/Comment.java +++ b/src/main/java/org/redkale/util/Comment.java @@ -5,9 +5,9 @@ */ package org.redkale.util; +import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * 标记注释,备注 @@ -17,7 +17,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @author zhangjx */ -@Deprecated +@Deprecated(since = "2.8.0") @Inherited @Documented @Target({TYPE, METHOD, FIELD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, TYPE_PARAMETER}) diff --git a/src/main/java/org/redkale/util/ConstructorParameters.java b/src/main/java/org/redkale/util/ConstructorParameters.java index 986bf13b6..0d87f37b1 100644 --- a/src/main/java/org/redkale/util/ConstructorParameters.java +++ b/src/main/java/org/redkale/util/ConstructorParameters.java @@ -5,7 +5,6 @@ */ package org.redkale.util; -import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; @@ -19,7 +18,7 @@ import static java.lang.annotation.ElementType.*; * @author zhangjx * @deprecated replaced by org.redkale.annotation.ConstructorParameters */ -@Deprecated +@Deprecated(since = "2.8.0") @Documented @Target({METHOD, CONSTRUCTOR}) @Retention(RUNTIME) diff --git a/src/main/java/org/redkale/util/LogExcludeLevel.java b/src/main/java/org/redkale/util/LogExcludeLevel.java index 53ad43d29..58d134fdc 100644 --- a/src/main/java/org/redkale/util/LogExcludeLevel.java +++ b/src/main/java/org/redkale/util/LogExcludeLevel.java @@ -5,9 +5,9 @@ */ package org.redkale.util; -import java.lang.annotation.*; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.*; /** * 等于level日志级别且包含keys字符串的日志才会被排除
@@ -26,7 +26,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @author zhangjx */ -@Deprecated +@Deprecated(since = "2.8.0") @Documented @Target({TYPE}) @Retention(RUNTIME) diff --git a/src/main/java/org/redkale/util/LogLevel.java b/src/main/java/org/redkale/util/LogLevel.java index 879c07a5f..3dd388658 100644 --- a/src/main/java/org/redkale/util/LogLevel.java +++ b/src/main/java/org/redkale/util/LogLevel.java @@ -5,9 +5,9 @@ */ package org.redkale.util; -import java.lang.annotation.*; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.*; /** * 被标记的日志级别以上的才会被记录 @@ -17,7 +17,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @author zhangjx */ -@Deprecated +@Deprecated(since = "2.8.0") @Documented @Target({TYPE}) @Retention(RUNTIME) diff --git a/src/main/java/org/redkale/util/ResourceListener.java b/src/main/java/org/redkale/util/ResourceListener.java index 328376c7c..edb9c051a 100644 --- a/src/main/java/org/redkale/util/ResourceListener.java +++ b/src/main/java/org/redkale/util/ResourceListener.java @@ -48,7 +48,7 @@ import java.lang.annotation.*; * @author zhangjx * @deprecated replaced by org.redkale.annotation.ResourceListener */ -@Deprecated +@Deprecated(since = "2.8.0") @Documented @Target({METHOD}) @Retention(RUNTIME) diff --git a/src/main/java/org/redkale/util/ResourceType.java b/src/main/java/org/redkale/util/ResourceType.java index b95220cf1..a79b13af7 100644 --- a/src/main/java/org/redkale/util/ResourceType.java +++ b/src/main/java/org/redkale/util/ResourceType.java @@ -21,7 +21,7 @@ import java.lang.annotation.*; * * @deprecated replaced by org.redkale.annotation.ResourceType */ -@Deprecated +@Deprecated(since = "2.8.0") @Inherited @Documented @Target({TYPE}) diff --git a/src/main/java/org/redkale/util/Version.java b/src/main/java/org/redkale/util/Version.java index 6a7acaec1..5e5ee7816 100644 --- a/src/main/java/org/redkale/util/Version.java +++ b/src/main/java/org/redkale/util/Version.java @@ -5,7 +5,6 @@ */ package org.redkale.util; -import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; @@ -22,7 +21,7 @@ import static java.lang.annotation.ElementType.*; * * @deprecated 暂不实现 */ -@Deprecated +@Deprecated(since = "2.8.0") @Inherited @Documented @Target({TYPE, METHOD})