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

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

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

    Natlive's blog

    A long way and dream.

     

    自翻譯·Freemarker 文檔(一)

    自己的英語水平只有一級半,為了努力學好英語,現在一天一個翻譯,先從Freemarker文檔開始,有不對的地方多謝指正拋磚。

    Create a configuration instance
    建立一個配置實例

    First you have to create a freemarker.template.Configuration instance and adjust its settings. A Configuration instance is a central place to store the appliction level setting of FreeMarker. Also, it deals with the creation and caching of pre-parsed templates.
    首先你必須建立一個freemarker.template.Configuration類的實例并調整它的設置. 一個Configuration類實例是保存Freemarker應用程序設置的中心首要. 同樣, 它決定著預編譯模版的建立和緩沖.

    Probably you will do it only once at the beginning of the application(possibly servlet) life-cycle:
    也許你只需要在程序開始時,僅僅只需調用一次下面的代碼,并且在程序的整個生命周期都可用:

    Configuration cfg = new Configuration();
    // Specify the data source where the template files come from.
    // 指定模板的數據源
    // Here I set a file directory for it:
    // 在這里我設置為一個目錄
    cfg.setDirectoryForTemplateLoading(new Fil("/where/you/store/templates"));
    // Specify how templates will see the data model. This is an advanced topic
    // 指定模板怎么讀取數據模型(data model). 這是一個需要專門討論的話題
    // but just use this:
    // 不過現在你可以這樣做
    cfg.setObjectWrapper(new DefaultObjectWrapper());  

    From now you should use this single configuration instance. Note however that if a system has multiple independent components that use FreeMarker, then of course they will use their own private Configuration instance.
    現在開始,你就可以使用這個Configuration實例了. 如果一個系統有多個模塊使用Freemarker的話, 毫無意外的, 它們最后使用它們各自私有的Configuration實例.

    posted on 2007-08-13 09:51 狂龍 閱讀(1010) 評論(1)  編輯  收藏 所屬分類: Freemarker

    評論

    # re: 自翻譯·Freemarker 文檔(一) 2007-09-10 16:29 wojiushicai

    好像少了點.....支持你樓主....加油..發更多的出來!!!  回復  更多評論   


    只有注冊用戶登錄后才能發表評論。


    網站導航:
    博客園   IT新聞   Chat2DB   C++博客   博問  
     

    導航

    統計

    常用鏈接

    留言簿(2)

    隨筆分類

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 久久精品国产亚洲av品善| 亚洲国产日韩在线视频| 亚洲一级毛片在线播放| 日韩精品内射视频免费观看| 亚洲一区二区三区在线观看精品中文 | 亚洲电影免费在线观看| 久久精品成人免费国产片小草| 亚洲国产精品专区在线观看| 亚洲a∨无码精品色午夜| 国产小视频在线观看免费| 大桥未久亚洲无av码在线| 国产午夜影视大全免费观看| 精品亚洲福利一区二区| 啊v在线免费观看| 一级做a爱过程免费视| 亚洲色婷婷一区二区三区| 久久精品国产免费| 亚洲五月激情综合图片区| 91精品国产免费久久久久久青草| 亚洲综合激情视频| 成人一a毛片免费视频| 精品国产亚洲一区二区三区在线观看 | 亚洲AV无码专区亚洲AV桃| 国产乱子伦精品免费无码专区| 美女视频黄频a免费观看| 在线精品亚洲一区二区三区| 中文字幕在线免费看线人| 中文字幕亚洲精品资源网| 一区二区无码免费视频网站| 久久亚洲中文字幕无码| 亚洲日本一区二区三区在线| 最近中文字幕大全中文字幕免费| 欧洲 亚洲 国产图片综合| 免费成人黄色大片| 无码人妻一区二区三区免费n鬼沢 无码人妻一区二区三区免费看 | 24小时免费直播在线观看| 鲁啊鲁在线视频免费播放| 亚洲国产成人一区二区三区| 免费国产黄网站在线观看可以下载| 7777久久亚洲中文字幕| 亚洲Av无码国产情品久久|