
package spring.sample.aop.proxyioc;

import spring.sample.aop.IMameTestBean;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * IoCコンテナを利用したBefore AdviceとAround Adviceのサンプルです。<br>
 * <br>
 * @author MBeans
 * @version 1.0
 */
public class BeforeAdviceSampleIoC {

	public static void main(String[] args) {
		try{
		
		BeanFactory bf = new ClassPathXmlApplicationContext("/spring/sample/aop/proxyioc/advisorProxy.xml");
		
		IMameTestBean proxied = (IMameTestBean) bf.getBean("testFactory");

		proxied.setName("0");
		proxied.getName();
		proxied.setName("1");
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
