阅读背景:

Spring工厂类

来源:互联网 
    /**
     * 读取磁盘上的配置文件
     */
    @Test
    public void demo3(){
        ApplicationContext applicationContext = new FileSystemXmlApplicationContext("c:\applicationContext.xml");
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.sayHello();
    }
    /**
     * 读取磁盘上的配置文件
     */
    @Test
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: