SpringStudy
- 适当给所有文件添加注释并格式化
This commit is contained in:
@@ -7,6 +7,11 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
public class Main {
|
||||
// 主要学习
|
||||
//启动容器: new ClassPathXmlApplicationContext(...)
|
||||
//取普通 Bean: getBean("myUser")
|
||||
//取 FactoryBean 的产品: getBean("dept")
|
||||
//取 FactoryBean 本身: getBean("&dept")
|
||||
public static void main(String[] args) {
|
||||
// ApplicationContext(应用上下文) 是 Spring 的容器接口,
|
||||
// 所有实现了该接口的类型都可以当作容器使用.
|
||||
|
||||
Reference in New Issue
Block a user