Spring 底层核心原理 发表于 2023-02-02 更新于 2024-07-22 分类于 Java , Spring 本文字数: 35 阅读时长 ≈ 1 分钟 1. Spring framework123456AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(AppConfig.class);// 获取 Bean 对象 UserService userService=context.getBean("userService");// 创建对象 UserService userService=new UserService(); context 容器中去获取对象