package com.ssm.first;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestFirst {
    public static void main(String[] args) {
        // 1. 加载Spring配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        // 2. 从容器中获取User对象
        User user = (User) context.getBean("user");

        // 3. 打印结果
        System.out.println(user.getName() + "test222");
    }
}