Spring-源码阅读

    科技2022-07-12  130

    spring-core
    spring-beans
    spring-aop
    spring-context
    GenericApplicationContext genericApplicationContext=new GenericApplicationContext(); genericApplicationContext.registerBean(HelloServiceImpl.class); genericApplicationContext.refresh(); HelloService bean = genericApplicationContext.getBean(HelloService.class); AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); context.scan("org.springframework.context.annotation6"); context.refresh(); Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class);
    Processed: 0.014, SQL: 8