|
|
|
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, 18:56:24 |
|
||
|
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, 19:02:12 |
|
||
|
getBean c амперсандом
|
|||
|---|---|---|---|
|
#18+
Blazkowicz, не уверен в своем английском поэтому уточню Код: java 1. - возвращает инстанс самой фабрики Код: java 1. - возвращает инстанс объекта, который приготовлен фабрикой? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.09.2013, 21:08:57 |
|
||
|
|

start [/forum/topic.php?fid=59&fpage=209&tid=2128549]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
276ms |
get topic data: |
16ms |
get forum data: |
5ms |
get page messages: |
58ms |
get tp. blocked users: |
3ms |
| others: | 263ms |
| total: | 655ms |

| 0 / 0 |
