This commit is contained in:
redkale
2023-12-07 15:26:08 +08:00
parent 0177599442
commit e204b60ac4
4 changed files with 7 additions and 7 deletions

View File

@@ -39,8 +39,8 @@ public @interface Resource {
* 资源名称 <br> * 资源名称 <br>
* <blockquote><pre> * <blockquote><pre>
* name规则: * name规则:
* 1: "#"有特殊含义, 表示资源本身,"#"不能单独使用 * 1: "@"有特殊含义, 表示资源本身,"@"不能单独使用
* 2: "@name"、"@type"有特殊含义 * 2: "#name"、"#type"有特殊含义
* 3: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合 * 3: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合
* </pre></blockquote> * </pre></blockquote>
* *

View File

@@ -9,7 +9,7 @@ import org.redkale.util.AnyValue;
/** /**
* 所有Service的实现类不得声明为final 允许远程模式的public方法都不能声明为final。<br> * 所有Service的实现类不得声明为final 允许远程模式的public方法都不能声明为final。<br>
* 注意: "#"是一个很特殊的Service.name值 。 被标记为&#64;Resource(name = "#") 的Service的资源名与所属父Service的资源名一致。<br> * 注意: "@"是一个很特殊的Service.name值 。 被标记为&#64;Resource(name = "@") 的Service的资源名与所属父Service的资源名一致。<br>
* *
* <blockquote><pre> * <blockquote><pre>
* Service的资源类型 * Service的资源类型

View File

@@ -124,8 +124,8 @@ public final class ResourceFactory {
* 检查资源名是否合法 * 检查资源名是否合法
* <blockquote><pre> * <blockquote><pre>
* name规则: * name规则:
* 1: "#"有特殊含义, 表示资源本身,"#"不能单独使用 * 1: "@"有特殊含义, 表示资源本身,"@"不能单独使用
* 2: "@name"、"@type"有特殊含义 * 2: "#name"、"#type"有特殊含义
* 3: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合 * 3: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合
* </pre></blockquote> * </pre></blockquote>
* *

View File

@@ -46,10 +46,10 @@ public class ResourceLoaderTest {
public static class Bean { public static class Bean {
@Resource(name = "#.id") @Resource(name = "@.id")
public int id; public int id;
@Resource(name = "#.name") @Resource(name = "@.name")
public String name; public String name;
public Bean() { public Bean() {