When using the @Component and @Value group instead of placing properties in the XML, by debugging from spring source code, I found that when execute to method applyPropertyValues in class AbstractAutowireCapableBeanFactory, param PropertyValues pvs size is 0, so the code cannot continue execute, it returns. As my understanding,@Component @Value annotated property is also injected into IoC finally and the Bean has its own properyvalues. Not sure about this question. Can someone explain the property initialization with @Component and @Value and XML, the two ways?
No comments:
Post a Comment