Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
普通程序员一名
spring-framework
提交
5740eaf3
S
spring-framework
项目概览
普通程序员一名
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
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 搜索 >>
提交
5740eaf3
编写于
4月 21, 2021
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
80d46ba8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
8 deletion
+9
-8
src/docs/asciidoc/core/core-beans.adoc
src/docs/asciidoc/core/core-beans.adoc
+9
-8
未找到文件。
src/docs/asciidoc/core/core-beans.adoc
浏览文件 @
5740eaf3
...
...
@@ -847,12 +847,12 @@ This approach shows that the factory bean itself can be managed and configured t
dependency injection (DI). See <<beans-factory-properties-detailed,Dependencies and
Configuration in Detail>>.
NOTE: In Spring documentation, "
`factory bean`" refers to a bean that is configured in
the
Spring container and that creates objects through an
NOTE: In Spring documentation, "
factory bean" refers to a bean that is configured in the
Spring container and that creates objects through an
<<beans-factory-class-instance-factory-method,instance>> or
<<beans-factory-class-static-factory-method,static>> factory method. By contrast,
`FactoryBean` (notice the capitalization) refers to a Spring-specific
<<beans-factory-extension-factorybean, `FactoryBean`
>> implementation class.
<<beans-factory-extension-factorybean, `FactoryBean`>> implementation class.
[[beans-factory-type-determination]]
...
...
@@ -3350,8 +3350,9 @@ of the scope. You can also do the `Scope` registration declaratively, by using t
</
beans
>
----
NOTE
:
When
you
place
`<
aop
:
scoped
-
proxy
/>`
in
a
`
FactoryBean
`
implementation
,
it
is
the
factory
bean
itself
that
is
scoped
,
not
the
object
returned
from
`
getObject
()`.
NOTE
:
When
you
place
`<
aop
:
scoped
-
proxy
/>`
within
a
`<
bean
>`
declaration
for
a
`
FactoryBean
`
implementation
,
it
is
the
factory
bean
itself
that
is
scoped
,
not
the
object
returned
from
`
getObject
()`.
...
...
@@ -4545,16 +4546,16 @@ The `FactoryBean<T>` interface provides three methods:
instance
can
possibly
be
shared
,
depending
on
whether
this
factory
returns
singletons
or
prototypes
.
*
`
boolean
isSingleton
()`:
Returns
`
true
`
if
this
`
FactoryBean
`
returns
singletons
or
`
false
`
otherwise
.
`
false
`
otherwise
.
The
default
implementation
of
this
method
returns
`
true
`.
*
`
Class
<?>
getObjectType
()`:
Returns
the
object
type
returned
by
the
`
getObject
()`
method
or
`
null
`
if
the
type
is
not
known
in
advance
.
The
`
FactoryBean
`
concept
and
interface
is
used
in
a
number
of
places
within
the
Spring
The
`
FactoryBean
`
concept
and
interface
are
used
in
a
number
of
places
within
the
Spring
Framework
.
More
than
50
implementations
of
the
`
FactoryBean
`
interface
ship
with
Spring
itself
.
When
you
need
to
ask
a
container
for
an
actual
`
FactoryBean
`
instance
itself
instead
of
the
bean
it
produces
,
pref
ace
the
bean
's `id` with the ampersand symbol (`&`) when
the
bean
it
produces
,
pref
ix
the
bean
's `id` with the ampersand symbol (`&`) when
calling the `getBean()` method of the `ApplicationContext`. So, for a given `FactoryBean`
with an `id` of `myBean`, invoking `getBean("myBean")` on the container returns the
product of the `FactoryBean`, whereas invoking `getBean("&myBean")` returns the
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录