Resource的#改成@

This commit is contained in:
redkale
2023-12-07 15:18:08 +08:00
parent 9f0a2b99b7
commit 0177599442
3 changed files with 10 additions and 10 deletions

View File

@@ -8,9 +8,9 @@ package org.redkale.annotation;
import java.lang.annotation.*;
/**
* &#64;Resource(name = "#") 表示资源name采用所属对象的name <br>
* &#64;Resource(name = "@name") 表示资源对象自身的name <br>
* &#64;Resource(name = "@type") 表示资源对象自身的类型 <br>
* &#64;Resource(name = "@") 表示资源name采用所属对象的name <br>
* &#64;Resource(name = "#name") 表示资源对象自身的name <br>
* &#64;Resource(name = "#type") 表示资源对象自身的类型 <br>
*
* @since Common Annotations 1.0
*
@@ -20,11 +20,11 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
public @interface Resource {
public static final String PARENT_NAME = "#";
public static final String PARENT_NAME = "@";
public static final String SELF_NAME = "@name";
public static final String SELF_NAME = "#name";
public static final String SELF_TYPE = "@type";
public static final String SELF_TYPE = "#type";
/**
* 是否必须存在

View File

@@ -171,7 +171,7 @@ public class WorkThread extends Thread implements Executor {
* 1、work线程池
* 2、虚拟线程
* 3、当前线程
* <bt>
* <br>
* <b>与execute的区别子类AsyncIOThread中execute会被重载确保优先在IO线程中执行</b>
*
* @param command 任务

View File

@@ -24,12 +24,12 @@ import org.redkale.convert.*;
*
* 依赖注入功能主类 <br>
*
* 如果&#64;Resource(name = "#") 表示资源name采用所属对象的name <br>
* 如果&#64;Resource(name = "@") 表示资源name采用所属对象的name <br>
* 如果没有&#64;Resource且对象实现了Resourcable, 则会取对象的resourceName()方法值
* <blockquote><pre>
* name规则:
* 1: "#"有特殊含义, 表示资源本身,"#"不能单独使用
* 2: "@name"、"@type"有特殊含义
* 1: "@"有特殊含义, 表示资源本身,"@"不能单独使用
* 2: "#name"、"#type"有特殊含义
* 3: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合
* </pre></blockquote>
* <p>