I would like to separate one context of the Spring application (java application), which uses <context:annotation-config />several <context:component-scan ../>, but does not know exactly how the beans are connected there.
The application context (BeanFactory) provides a list of available beans and for each bean I would like to get a list of related beans - so those that are:
- marked as "dependsOn" - the ones I can get from BeanDefinition
- used as a reference to the constructor
- used to execute @Autowired
- used as property / setter reference
- ... is there any other relationship?
Having such a relationship (matrix), I can determine where to cut - which beans can be transferred to the new (smaller) application context (java application), which should be exported / accessible via WS / RMI, etc.
Is there a way to extract such a relationship from an application context object? How to get such a matrix / graph ratio?
source
share