<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 文檔(一)

    自己的英語(yǔ)水平只有一級(jí)半,為了努力學(xué)好英語(yǔ),現(xiàn)在一天一個(gè)翻譯,先從Freemarker文檔開始,有不對(duì)的地方多謝指正拋磚。

    Create a configuration instance
    建立一個(gè)配置實(shí)例

    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.
    首先你必須建立一個(gè)freemarker.template.Configuration類的實(shí)例并調(diào)整它的設(shè)置. 一個(gè)Configuration類實(shí)例是保存Freemarker應(yīng)用程序設(shè)置的中心首要. 同樣, 它決定著預(yù)編譯模版的建立和緩沖.

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

    Configuration cfg = new Configuration();
    // Specify the data source where the template files come from.
    // 指定模板的數(shù)據(jù)源
    // Here I set a file directory for it:
    // 在這里我設(shè)置為一個(gè)目錄
    cfg.setDirectoryForTemplateLoading(new Fil("/where/you/store/templates"));
    // Specify how templates will see the data model. This is an advanced topic
    // 指定模板怎么讀取數(shù)據(jù)模型(data model). 這是一個(gè)需要專門討論的話題
    // but just use this:
    // 不過(guò)現(xiàn)在你可以這樣做
    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.
    現(xiàn)在開始,你就可以使用這個(gè)Configuration實(shí)例了. 如果一個(gè)系統(tǒng)有多個(gè)模塊使用Freemarker的話, 毫無(wú)意外的, 它們最后使用它們各自私有的Configuration實(shí)例.

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

    評(píng)論

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

    好像少了點(diǎn).....支持你樓主....加油..發(fā)更多的出來(lái)!!!  回復(fù)  更多評(píng)論   


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(2)

    隨筆分類

    隨筆檔案

    搜索

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 美女裸身网站免费看免费网站| a级毛片免费播放| 99久久免费精品国产72精品九九| 国产亚洲成av人片在线观看 | 精品亚洲视频在线观看| 理论秋霞在线看免费| 青青青国产色视频在线观看国产亚洲欧洲国产综合 | 久久久久亚洲精品男人的天堂 | 亚洲国产成人AV在线播放| 日韩成人免费aa在线看| 欧美激情综合亚洲一二区| 四虎国产精品免费视| 日韩免费在线中文字幕| 亚洲精品高清无码视频| 免费无码一区二区三区| jlzzjlzz亚洲jzjzjz| 免费高清资源黄网站在线观看| 亚洲国产美女精品久久久| 亚洲成A∨人片天堂网无码| 中文字幕免费人成乱码中国| 亚洲国产精品SSS在线观看AV| 久久午夜伦鲁片免费无码| 国产精品亚洲精品| 国产精品酒店视频免费看| 一级成人毛片免费观看| 亚洲不卡av不卡一区二区| 91精品免费久久久久久久久| 亚洲高清有码中文字| 免费人成视网站在线观看不卡| h视频在线观看免费| 久久久久久久亚洲Av无码| 免费毛片在线看片免费丝瓜视频| 免费看内射乌克兰女| 亚洲国产一区二区a毛片| 成年人免费视频观看| 99久久精品毛片免费播放| 国产99在线|亚洲| 日韩亚洲变态另类中文| 成人免费黄色网址| 一区二区三区精品高清视频免费在线播放| 亚洲精品狼友在线播放|