package com.ncut.pay;

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

/**
 * @Classname: PayAction
 * @Description: TODO
 * @Author: lijedi
 * @Date: 2019-09-15 08:31
 **/
public class PayAction {

    public static void main(String[] args) {

        String xmlpath = "com/ncut/config/applicationContext.xml";
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlpath);
        IPayService wechatPay = applicationContext.getBean(WechatPayImpl.class);
        IPayService aliPay = applicationContext.getBean(AliPayImpl.class);
        IPayService miPay = applicationContext.getBean(MiPayImpl.class);

        wechatPay.pay();
        aliPay.pay();
        miPay.pay();

    }

}
