Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
773cd324
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
773cd324
编写于
11月 28, 2017
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
f2e8171b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
spring-context/src/main/java/org/springframework/context/annotation/Bean.java
...ain/java/org/springframework/context/annotation/Bean.java
+3
-3
spring-core/src/main/java/org/springframework/core/annotation/Order.java
.../main/java/org/springframework/core/annotation/Order.java
+1
-1
src/docs/asciidoc/core/core-beans.adoc
src/docs/asciidoc/core/core-beans.adoc
+3
-3
未找到文件。
spring-context/src/main/java/org/springframework/context/annotation/Bean.java
浏览文件 @
773cd324
...
...
@@ -78,7 +78,7 @@ import org.springframework.core.annotation.AliasFor;
* </pre>
*
* The semantics of the above-mentioned annotations match their use at the component
* class level: {@code Profile} allows for selective inclusion of certain beans.
* class level: {@code
@
Profile} allows for selective inclusion of certain beans.
* {@code @Scope} changes the bean's scope from singleton to the specified scope.
* {@code @Lazy} only has an actual effect in case of the default singleton scope.
* {@code @DependsOn} enforces the creation of specific other beans before this
...
...
@@ -96,12 +96,12 @@ import org.springframework.core.annotation.AliasFor;
* order values determine the order of resolved elements in case of collection
* injection points (with several target beans matching by type and qualifier).
*
* <p><b>NOTE:</b> {@code @Order} values may influence priorities at injection points
* <p><b>NOTE:</b> {@code @Order} values may influence priorities at injection points
,
* but please be aware that they do not influence singleton startup order which is an
* orthogonal concern determined by dependency relationships and {@code @DependsOn}
* declarations as mentioned above. Also, {@link javax.annotation.Priority} is not
* available at this level since it cannot be declared on methods; its semantics can
* be model
l
ed through {@code @Order} values in combination with {@code @Primary} on
* be modeled through {@code @Order} values in combination with {@code @Primary} on
* a single bean per type.
*
* <h3>{@code @Bean} Methods in {@code @Configuration} Classes</h3>
...
...
spring-core/src/main/java/org/springframework/core/annotation/Order.java
浏览文件 @
773cd324
...
...
@@ -42,7 +42,7 @@ import org.springframework.core.Ordered;
*
* <p>Since Spring 4.1, the standard {@link javax.annotation.Priority} annotation
* can be used as a drop-in replacement for this annotation in ordering scenarios.
* Note that {@code Priority} may have additional semantics when a single element
* Note that {@code
@
Priority} may have additional semantics when a single element
* has to be picked (see {@link AnnotationAwareOrderComparator#getPriority}).
*
* <p>Alternatively, order values may also be determined on a per-instance basis
...
...
src/docs/asciidoc/core/core-beans.adoc
浏览文件 @
773cd324
...
...
@@ -4438,17 +4438,17 @@ The same applies for typed collections:
====
Your
target
beans
can
implement
the
`
org
.
springframework
.
core
.
Ordered
`
interface
or
use
the
`@
Order
`
or
standard
`@
Priority
`
annotation
if
you
want
items
in
the
array
or
list
to
be
sorted
in
to
a
specific
order
.
Otherwise
their
order
will
follow
the
registration
to
be
sorted
in
a
specific
order
.
Otherwise
their
order
will
follow
the
registration
order
of
the
corresponding
target
bean
definitions
in
the
container
.
The
`@
Order
`
annotation
may
be
declared
at
target
class
level
but
also
on
`@
Bean
`
methods
,
potentially
being
very
individual
per
bean
definition
(
in
case
of
multiple
definitions
with
the
same
bean
class
).
`@
Order
`
values
may
influence
priorities
at
injection
points
with
the
same
bean
class
).
`@
Order
`
values
may
influence
priorities
at
injection
points
,
but
please
be
aware
that
they
do
not
influence
singleton
startup
order
which
is
an
orthogonal
concern
determined
by
dependency
relationships
and
`@
DependsOn
`
declarations
.
Note
that
the
standard
`
javax
.
annotation
.
Priority
`
annotation
is
not
available
at
the
`@
Bean
`
level
since
it
cannot
be
declared
on
methods
.
Its
semantics
can
be
model
l
ed
`@
Bean
`
level
since
it
cannot
be
declared
on
methods
.
Its
semantics
can
be
modeled
through
`@
Order
`
values
in
combination
with
`@
Primary
`
on
a
single
bean
per
type
.
====
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录