
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
23.09.2013, 18:56:24
|
|||
|---|---|---|---|
|
|||
getBean c амперсандом |
|||
|
#18+
Встретил такую строчку: Код: java 1. подскажите что значит амперсанд тут? Если что вот бин: Код: xml 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
23.09.2013, 19:02:12
|
|||
|---|---|---|---|
|
|||
getBean c амперсандом |
|||
|
#18+
http://docs.spring.io/spring/docs/3.1.x/spring-framework-reference/html/beans.html#beans-factory-extension-factorybean http://docs.spring.io/spring/docs/2.5.x/api/org/springframework/beans/factory/FactoryBean.html RTFMWhen you need to ask a container for an actual FactoryBean instance itself instead of the bean it produces, preface 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 FactoryBean instance itself. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
23.09.2013, 21:08:57
|
|||
|---|---|---|---|
|
|||
getBean c амперсандом |
|||
|
#18+
Blazkowicz, не уверен в своем английском поэтому уточню Код: java 1. - возвращает инстанс самой фабрики Код: java 1. - возвращает инстанс объекта, который приготовлен фабрикой? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=59&tablet=1&tid=2128549]: |
0ms |
get settings: |
20ms |
get forum list: |
28ms |
check forum access: |
8ms |
check topic access: |
8ms |
track hit: |
68ms |
get topic data: |
23ms |
get forum data: |
6ms |
get page messages: |
73ms |
get tp. blocked users: |
3ms |
| others: | 334ms |
| total: | 571ms |

| 0 / 0 |
