Skip to content

Commit bd368c2

Browse files
committed
翻译附录B.2.2 值提供者
1 parent 6ce9907 commit bd368c2

File tree

1 file changed

+14
-30
lines changed

1 file changed

+14
-30
lines changed

X. Appendices/B.2.2 Value provider.md

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
1-
### 附录B.2.2 Value provider
1+
### 附录B.2.2 值提供者
22

3-
Providers are a powerful way of attaching semantics to a property. We define in the section below the official providers that you can use for your own hints. Bare in mind however that your favorite IDE may implement some of these or none of them. It could eventually provide its own as well.
3+
提供者是将语义附加到属性上的一种强大的方式。我们在下面的章节里定义了官方的提供者,你可以为你自己的提示使用它们。但是,必须记住:你最喜欢的IDE可能实现了其中的一部分,或者什么也没有实现。它也可以最后提供它自己。
44

5-
[Note]
6-
As this is a new feature, IDE vendors will have to catch up with this new feature.
7-
The table below summarizes the list of supported providers:
8-
9-
Name Description
10-
any
11-
12-
Permit any additional value to be provided.
13-
14-
class-reference
15-
16-
Auto-complete the classes available in the project. Usually constrained by a base class that is specified via the target parameter.
17-
18-
handle-as
19-
20-
Handle the property as if it was defined by the type defined via the mandatory target parameter.
21-
22-
logger-name
23-
24-
Auto-complete valid logger names. Typically, package and class names available in the current project can be auto-completed.
25-
26-
spring-bean-reference
5+
**** 由于这是一个新特性,IDE供应商将不得不追上这个新特性。
276

28-
Auto-complete the available bean names in the current project. Usually constrained by a base class that is specified via the target parameter.
7+
下面👇的表格总结了支持的提供者的列表:
298

30-
spring-profile-name
9+
|名称|描述|
10+
|----|:----|
11+
|`any`|允许提供额外的值|
12+
|`class-reference`|自动补全项目里可用的类。通常被一个由`目标`参数指定的基础的类约束|
13+
|`handle-as`|操作属性,就好像它是由强制的`目标`参数定义的类型一样|
14+
|`logger-name`|自动补全有效的记录器名。典型地,目前项目里可用的包名和类名会被自动补全|
15+
|`spring-bean-reference`|自动补全当前项目里可用的bean的名字。通常被一个由`目标`参数指定的基础的类约束|
16+
|`spring-profile-name`|自动补全当前项目里可用的Spring profile的名字|
3117

32-
Auto-complete the available Spring profile names in the project.
18+
**提示** 对于一个给定的属性,只能有一个有效的提供者。但是,如果可以以某种方式共同管理属性,你也可以指定多个提供者。确保把最强大的提供者放在第一位,因为IDE必须使用它能够处理的JSON部分里的第一个。如果对于一个给定的属性,没有提供者提供支持,也不会有特殊的内容帮助被提供。
3319

34-
[Tip]
35-
No more than one provider can be active for a given property but you can specify several providers if they can all manage the property in some ways. Make sure to place the most powerful provider first as the IDE must use the first one in the JSON section it can handle. If no provider for a given property is supported, no special content assistance is provided either.
36-
Any
20+
**Any**
3721

3822
The any provider permits any additional values to be provided. Regular value validation based on the property type should be applied if this is supported.
3923

0 commit comments

Comments
 (0)