First load idea is really slow ...
Perhaps my computer performance is too poor ...
I analyzed his internal set of indexing mechanisms that needed to be opened every time ...
Without solid state, the first turn is not as good as eclipse.
The first time to use the blog park, used to be in the CSDN mixed ~
So send a spring IOC source code, test the blog to see if the coding function of the garden is useful ~ ~ ~
This section of the source code for the IOC in the Refresh Start method, the creation of Beanfactory source code, also from the refresh start
IOC starts to load in 3 steps
1, resource positioning;
2. Loadbeandefinitions--> the bean and its attributes that are parsed by the XML configuration file are in spring's own defined data structure and then stored in a currenthashmap for access.
3, finally in the Getbean is the real dependence injection process hahaha.
/**
* This implementation performs a actual refresh of this context ' s underlying
* Bean factory, shutting down the previous beans factory (if any) and
* Initializing a fresh bean factory for the next phase of the context ' s lifecycle.
*/
@Override
Protected final void Refreshbeanfactory () throws Beansexception {
if (Hasbeanfactory ()) {
Destroybeans ();
Closebeanfactory ();
}
try {
Defaultlistablebeanfactory beanfactory = Createbeanfactory ();
Beanfactory.setserializationid (GetId ());
Customizebeanfactory (beanfactory);
Loadbeandefinitions (beanfactory);
Synchronized (this.beanfactorymonitor) {
This.beanfactory = beanfactory;
}
}
catch (IOException ex) {
throw new Applicationcontextexception ("I/O error parsing bean definition source for" + GetDisplayName (), ex);
}
}
Test-spring Source Code harvesting