主启动:
ConfigurableApplicationContext run = SpringApplication.run(XterpApplication.class, args);
String[] beanNamesForType = run.getBeanNamesForType(Object.class);
for (String s : beanNamesForType) {
System.out.println(s);
}
启动的结果 就是 run ! 是个容器
上面是打印 容器里面初始化的所有Bean (传入参数Object.class : 是看所有类,)
结果: 非常多的类, xxxxxController , xxxxService, xxxxxMapper,
sqlSessionFactory
sqlSessionTemplate
xxxxxConfiguration