extensions question
Cantor, Scott
cantor.2 at osu.edu
Thu Mar 10 12:50:15 EST 2016
> That’s definitely happening. So in my bean definition parser, I need to be
> adding a bean for that configuration file as a parsed DOM object?
No, at least I don't think so if I'm following what you're asking. I guess I would suggest you look at the filter or resolver services to see how they actually build themselves. The RelyingParty one too, but that one in V2 is a little weird I think.
Your bean definition parsers are there to parse specific DOM elements that you register for handling with Spring. Spring will call your parser when it encounters one. What generally happens is that you register for some top level root element, and inside that parser, it will call Spring to parse its child elements into beans that get injected into the object you're parsing the root element into.
Keep in mind you don't *have* to do all this. V2 was full of custom parsing by intention, but you could just have things built with native Spring XML if you wanted, and skip all the bean parsing. All the new V3 services were done that way, we just left the custom parsing there for the resolver and filter and other compatibility needs.
It turns out that once you know how it works, native Spring XML is much more powerful than most custom XML is and easier to do useful things with as a deployer.
-- Scott
More information about the dev
mailing list