<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    afrag  
    記錄學習和成長的歷程
    日歷
    <2009年8月>
    2627282930311
    2345678
    9101112131415
    16171819202122
    23242526272829
    303112345
    統計
    • 隨筆 - 9
    • 文章 - 5
    • 評論 - 2
    • 引用 - 0

    導航

    常用鏈接

    留言簿

    隨筆分類

    隨筆檔案

    文章檔案

    搜索

    •  

    積分與排名

    • 積分 - 10138
    • 排名 - 2383

    最新評論

    閱讀排行榜

    評論排行榜

     

    在Spring 的AOP中,如果一個Proxy同時實現MethodBeforeAdvice、AfterReturningAdvice和MethodInterceptor接口,那么這三個Advice的執行順序是什么樣的呢?
    經過試驗,是和xml文件中的定義順序有關的。
    如果Proxy的接口實現定義為
    ?????
    ?????????
    ??????????? MethodBeforeAdvice
    ??????????? AfterReturningAdvice
    ??????????? MethodInterceptor
    ?????????

    ?????

    那么執行的結果是
    MethodBeforeAdvice

    MethodInterceptor: before call

    Really method excuting

    MethodInterceptor: after call

    AfterReturningAdvice

    也就是說,執行順序是:MethodBeforeAdvice,MethodInterceptor的調用前的部分,目標方法,MethodInterceptor的調用后的部分,AfterReturningAdvice。

    如果proxy的定義是
    ?????
    ?????????
    ??????????? MethodBeforeAdvice
    ??????????? MethodInterceptor
    ??????????? AfterReturningAdvice
    ?????????

    ?????

    執行的結果是
    MethodBeforeAdvice

    MethodInterceptor: before call

    Really method excuting

    AfterReturningAdvice

    MethodInterceptor: after call
    也就是說,執行的順序是:MethodBeforeAdvice,MethodInterceptor的調用前的部分,目標方法,AfterReturningAdvice,MethodInterceptor的調用后的部分。

    如果proxy的定義是
    ?????
    ?????????
    ??????????? MethodInterceptor
    ??????????? MethodBeforeAdvice
    ??????????? AfterReturningAdvice
    ?????????

    ?????

    執行的結果是:
    MethodInterceptor: before call

    MethodBeforeAdvice

    Really method excuting

    AfterReturningAdvice

    MethodInterceptor: after call
    也就是說,執行的順序是:MethodInterceptor的調用前的部分,MethodBeforeAdvice,目標方法,AfterReturningAdvice,MethodInterceptor的調用后的部分。
    以上的順序是在springframework 1.2.5中測試的。

    posted on 2005-11-02 18:10 afrag 閱讀(3716) 評論(1)  編輯  收藏 所屬分類: Java隨想
    評論:
     
    Copyright © afrag Powered by: 博客園 模板提供:滬江博客
    主站蜘蛛池模板: 动漫黄网站免费永久在线观看| 亚洲免费福利视频| 很黄很污的网站免费| 免费A级毛片av无码| 黄页网站免费观看| 免费国产综合视频在线看 | 免费一级毛片在线播放视频| 亚洲高清视频免费| 日韩在线天堂免费观看| 精品国产亚洲男女在线线电影 | 免费乱理伦在线播放| 久久国产亚洲精品麻豆| 亚洲xxxxxx| 春意影院午夜爽爽爽免费| 99re在线这里只有精品免费| 在线观看亚洲免费| 亚洲AV无码成人精品区在线观看| 亚洲一区二区三区深夜天堂| 免费高清A级毛片在线播放| 99爱免费观看视频在线| 国产老女人精品免费视频| 国产成人A人亚洲精品无码| 色噜噜亚洲男人的天堂| 久久精品成人免费国产片小草| 五月亭亭免费高清在线| 亚洲AV无码乱码在线观看性色扶 | 亚洲午夜无码久久久久小说 | 免费的涩涩视频在线播放| 亚洲色偷偷综合亚洲AVYP| 亚洲中文字幕无码mv| 中国一级全黄的免费观看| 成人啪精品视频免费网站| 亚洲VA中文字幕无码一二三区| 国产精品亚洲一区二区麻豆| 你好老叔电影观看免费| 日本高清免费aaaaa大片视频| 亚洲国产精品久久久久久| 免费人成再在线观看网站| 91成人免费在线视频| 亚洲日产无码中文字幕| 亚洲乱码国产乱码精华|