Legacy Spring / eGovFrame codebases declare beans in XML, so annotation-free classes look dead in the graph today: codegraph emits only a file node per Spring config XML (the MyBatis extractor correctly skips them as non-mapper).
This adds a lenient Spring <beans> extractor: <beans>-rooted XML (comment-aware root sniff; everything else keeps the MyBatis path untouched) emits bean nodes, an instantiates edge to the class= FQN — which is what finally connects a Java class to its XML bean — and bean→bean references (ref/idref/parent/depends-on/factory-bean/p:/c:-ref/method-injection, recursive through collections/inner beans, resolved cross-file by bean name incl. aliases).
Reference implementation on my fork — regex/stack-based like the MyBatis extractor, no new dependency, 56 inline tests:
https://github.com/ESPINS/codegraph/tree/feat/spring-beans-extractor
Validated on the public eGovFrame web sample (Apache-2.0): an annotation-free class (EgovSampleExcepHndlr) now shows its XML bean in the codegraph node trail; 3/3 in-repo instantiates resolved, 16/24 refs resolved (all 8 misses are documented blind spots — annotation-scanned beans etc.); non-Spring XML (pom/web.xml/log4j) unaffected; no node explosion. Documented v1 deferrals in-source: SpEL #{bean} refs, and the mapperLocations → mapper-file promotion that would complete the Spring↔MyBatis bridge.
Independent of #1209 (zero shared files — the branches apply cleanly in any order).
Pick / re-implement whatever's useful.
Legacy Spring / eGovFrame codebases declare beans in XML, so annotation-free classes look dead in the graph today: codegraph emits only a file node per Spring config XML (the MyBatis extractor correctly skips them as non-mapper).
This adds a lenient Spring
<beans>extractor:<beans>-rooted XML (comment-aware root sniff; everything else keeps the MyBatis path untouched) emits bean nodes, aninstantiatesedge to theclass=FQN — which is what finally connects a Java class to its XML bean — and bean→beanreferences(ref/idref/parent/depends-on/factory-bean/p:/c:-ref/method-injection, recursive through collections/inner beans, resolved cross-file by bean name incl. aliases).Reference implementation on my fork — regex/stack-based like the MyBatis extractor, no new dependency, 56 inline tests:
https://github.com/ESPINS/codegraph/tree/feat/spring-beans-extractor
Validated on the public eGovFrame web sample (Apache-2.0): an annotation-free class (
EgovSampleExcepHndlr) now shows its XML bean in thecodegraph nodetrail; 3/3 in-repoinstantiatesresolved, 16/24 refs resolved (all 8 misses are documented blind spots — annotation-scanned beans etc.); non-Spring XML (pom/web.xml/log4j) unaffected; no node explosion. Documented v1 deferrals in-source: SpEL#{bean}refs, and themapperLocations→ mapper-file promotion that would complete the Spring↔MyBatis bridge.Independent of #1209 (zero shared files — the branches apply cleanly in any order).
Pick / re-implement whatever's useful.