/*
* Copyright 2015 Zhongan.com All right reserved. This software is the
* confidential and proprietary information of Zhongan.com ("Confidential
* Information"). You shall not disclose such Confidential Information and shall
* use it only in accordance with the terms of the license agreement you entered
* into with Zhongan.com.
*/
package com.dingwang.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.dingwang.FactoryBean.HWFactoryBean;
import com.dingwang.FactoryBean.HelloWorldService;
/**
* 类Client.java的实现描述:
*
* @author dingwang 2015年10月14日 下午3:29:40
*/
public class Client {
public static final Logger log = LoggerFactory.getLogger(Client.class);
public static void main(String[] args) throws Exception {
ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "classpath:spring-bean.xml" });
HelloWorldService hw = (HelloWorldService) context.getBean("proxyHW");
log.info("-----------------华丽的分割线-------------------------");
hw.sayHelloWorld("LiuBei");
log.info("-----------------华丽的分割线-------------------------");
hw.sayGood("CaoCao");
log.info("-----------------华丽的分割线-------------------------");
hw.smile("SunQuan");
HWFactoryBean hb = (HWFactoryBean) context.getBean("&proxyHW");
log.warn(hb.getClass().getName());
}
}