到现在估计大家都开始晕了,那我再跑一遍流程:
这里要加以下代码:@Import(ImportTest.class)
public class ImportTest {
}
package com.example.dtest2.Common;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@ComponentScan({"com.example"})
@Import(ImportTest.class)
public class Appconfig {
public Appconfig(){
System.out.println("test0 create");
}
}
来吧,流程走起:
续(78行左右)
续211行左右
到达目的地了这个方法:
protected final ConfigurationClassParser.SourceClass doProcessConfigurationClass(ConfigurationClass configClass, ConfigurationClassParser.SourceClass sourceClass, Predicate<String> filter)
下面开始: