欢迎使用CSDN-markdown编辑器

来源:互联网 发布:淘宝手机店铺怎么装修 编辑:程序博客网 时间:2024/06/07 19:27

111

        public static void main(String[] args) {            //1.创建springIOC容器            ApplicationContext context=neClassPathXmlApplicationContext("spring-web.xml");            //2.从IOC容器中获取bean的实例            Atithmet atit=(Atithmet) context.getBean(Atithmet.class);            //3.使用bean            System.out.println(atit.add(10, 5));            System.out.println(atit.sub(10, 5));        }
原创粉丝点击