千山鳥飛絕 萬徑人蹤滅
          勤練內功,不斷實踐招數。爭取早日成為武林高手

          導航

          <2009年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345
          統計
          • 隨筆 - 26
          • 文章 - 1
          • 評論 - 15
          • 引用 - 0

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          必學知識

          超鏈接

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           

          public class PersonServiceBean implements IPersonService {

           public void init(){
            
            System.out.println("我是初始化函數");
           }
           
           public PersonServiceBean(){
            System.out.println("我是構造函數");
           }
           public void Save(){
            System.out.println("save方法");
           }
           
           public void cleanup(){
            System.out.println("cleanup方法");
           }
          }


          <bean id="personService"
            class="cn.itcast.service.impl.PersonServiceBean"
             init-method="init" destroy-method="cleanup"/>

          @Test public void instanceSpring(){
            ClassPathXmlApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");
            IPersonService ipersonService=(IPersonService)ctx.getBean("personService");
           ctx.close();

          posted on 2009-08-26 10:32 笑口常開、財源滾滾來! 閱讀(186) 評論(0)  編輯  收藏 所屬分類: spring學習
           
          主站蜘蛛池模板: 仁化县| 新宁县| 观塘区| 临泉县| 潜山县| 象山县| 千阳县| 万年县| 同仁县| 嘉鱼县| 泽普县| 平和县| 响水县| 苍山县| 南岸区| 古丈县| 永寿县| 湛江市| 莱西市| 锡林郭勒盟| 久治县| 萨嘎县| 雷州市| 东辽县| 保亭| 会东县| 桐城市| 镶黄旗| 芦山县| 日照市| 温泉县| 新宁县| 罗城| 龙江县| 禄丰县| 闸北区| 高密市| 宝丰县| 个旧市| 哈巴河县| 穆棱市|