|
|
|
Вопрос по спрингу. Форматирование стрнингов
|
|||
|---|---|---|---|
|
#18+
В конфиге спринга есть бин, конструктор которого принимает параметры в т.ч. и интовые, что выглядит как: Код: java 1. 2. 3. 4. На что получаю: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'target.eyes.vag.persistence.cassandra.logging.CassandraLogger#6179d854' defined in OSGi resource[clas spath:/vag-processor.xml|bnd.id=954|bnd.sym=target.eyes.vag.osgi]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean cl ass [target.eyes.vag.persistence.cassandra.logging.CassandraLogger]: Constructor threw exception; nested exception is java.lang.NumberFormatException: For input string: "9 160" at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[na:na] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) ~[na:na] ... 17 common frames omitted то есть как я понимаю, строка форматируется в человекочитабельный вид. Как это вообще лечить? Куда лезть? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.04.2012, 16:38:58 |
|
||
|
Вопрос по спрингу. Форматирование стрнингов
|
|||
|---|---|---|---|
|
#18+
Devider, Код: xml 1. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.04.2012, 17:36:22 |
|
||
|
Вопрос по спрингу. Форматирование стрнингов
|
|||
|---|---|---|---|
|
#18+
fingersbrain, Перемудрил, спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.04.2012, 17:42:39 |
|
||
|
Вопрос по спрингу. Форматирование стрнингов
|
|||
|---|---|---|---|
|
#18+
fingersbrain, В свежих версиях можно так: http://static.springsource.org/spring/docs/3.1.0.RELEASE/reference/html/beans.htm As of Spring 3.0 you can also use the constructor parameter name for value disambiguation: Код: plaintext 1. 2. 3. http://static.springsource.org/spring/docs/3.1.0.RELEASE/reference/html/beans.htm the c-namespace, newly introduced in Spring 3.1, allows usage of inlined attributes for configuring the constructor arguments rather then nested constructor-arg elements. Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.04.2012, 17:45:18 |
|
||
|
|

start [/forum/topic.php?fid=59&gotonew=1&tid=2132075]: |
0ms |
get settings: |
17ms |
get forum list: |
23ms |
check forum access: |
7ms |
check topic access: |
7ms |
track hit: |
38ms |
get topic data: |
18ms |
get first new msg: |
11ms |
get forum data: |
4ms |
get page messages: |
58ms |
get tp. blocked users: |
2ms |
| others: | 331ms |
| total: | 516ms |

| 0 / 0 |
