package com.bjpowernode.spring.client;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.bjpowernode.spring.manager.UserManager;
public class Client {
public static void main(String[] args) {
BeanFactory factory = new ClassPathXmlApplicationContext(
"applicationContext.xml");
// ApplicationContext factory = new
// ClassPathXmlApplicationContext("applicationContext.xml");
UserManager userManager = (UserManager) factory.getBean("userManager");
// UserManager userManager = new UserManagerImpl(new
// UserDao4MySqlImpl());
userManager.addUser("张三", "123");
}
}