Resource loading from XML to document
Resource Resource Description XML file
public static void Main (string[] args) {
Classpathresource resource = new Classpathresource ("Meta-inf/beans.xml"); C1/>beanfactory beanfactory = new Xmlbeanfactory (resource);
User user = Beanfactory.getbean ("user1", User.class);
System.out.println (User.getname () + ":" +user.getage ());
}
Xmlbeandefinitionreader XML File parsing
Encodedresource to encode InputStream
Xmlvalidationmodedetector detect DTD or XSD detection method (document header exists DOCTYPE)
Entityresolver the XSD map on the web in Spring.schemas to read the local XSD file
Defaultdocumentloader loaded into document
Genericbeandefinition One-stop service resource registration from document to Beandefinition
The main defaultbeandefinitiondocumentreader is to get the root
Beandefinitionparserdelegate the specific label to parse
To register a bean with a name and alias to obtain