diff --git a/src/javax/annotation/Priority.java b/src/javax/annotation/Priority.java new file mode 100644 index 000000000..5861f4a91 --- /dev/null +++ b/src/javax/annotation/Priority.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package javax.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @since Common Annotations 1.2 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface Priority { + int value(); +} diff --git a/src/org/redkale/boot/NodeHttpServer.java b/src/org/redkale/boot/NodeHttpServer.java index 8b8d20a98..9e2d5b42e 100644 --- a/src/org/redkale/boot/NodeHttpServer.java +++ b/src/org/redkale/boot/NodeHttpServer.java @@ -10,7 +10,7 @@ import java.lang.reflect.*; import java.net.InetSocketAddress; import java.util.*; import java.util.logging.Level; -import javax.annotation.Resource; +import javax.annotation.*; import org.redkale.boot.ClassFilter.FilterEntry; import org.redkale.net.*; import org.redkale.net.http.*; diff --git a/src/org/redkale/boot/NodeServer.java b/src/org/redkale/boot/NodeServer.java index ebf0707d5..984b21b33 100644 --- a/src/org/redkale/boot/NodeServer.java +++ b/src/org/redkale/boot/NodeServer.java @@ -15,7 +15,7 @@ import java.util.*; import java.util.concurrent.*; import java.util.function.*; import java.util.logging.*; -import javax.annotation.Resource; +import javax.annotation.*; import javax.persistence.Transient; import static org.redkale.boot.Application.*; import org.redkale.boot.ClassFilter.FilterEntry; diff --git a/src/org/redkale/net/Filter.java b/src/org/redkale/net/Filter.java index 5f31e363c..49d9348d5 100644 --- a/src/org/redkale/net/Filter.java +++ b/src/org/redkale/net/Filter.java @@ -6,6 +6,7 @@ package org.redkale.net; import java.io.IOException; +import javax.annotation.Priority; import org.redkale.util.*; /** diff --git a/src/org/redkale/util/Priority.java b/src/org/redkale/util/Priority.java deleted file mode 100644 index e02258497..000000000 --- a/src/org/redkale/util/Priority.java +++ /dev/null @@ -1,27 +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; - -/** - * 优先级, 值越大优先级最高,越靠前执行 - * - *

- * 详情见: https://redkale.org - * - * @author zhangjx - */ -@Inherited -@Documented -@Target({TYPE, METHOD}) -@Retention(RUNTIME) -public @interface Priority { - - int value() default 0; -}