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

    自己的英語水平只有一級半,為了努力學(xué)好英語,現(xiàn)在一天一個翻譯,先從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類的實例并調(diào)整它的設(shè)置. 一個Configuration類實例是保存Freemarker應(yīng)用程序設(shè)置的中心首要. 同樣, 它決定著預(yù)編譯模版的建立和緩沖.

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

    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è)置為一個目錄
    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). 這是一個需要專門討論的話題
    // but just use this:
    // 不過現(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)在開始,你就可以使用這個Configuration實例了. 如果一個系統(tǒng)有多個模塊使用Freemarker的話, 毫無意外的, 它們最后使用它們各自私有的Configuration實例.

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

    評論

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

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


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


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

    導(dǎo)航

    統(tǒng)計

    常用鏈接

    留言簿(2)

    隨筆分類

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产在线观看xxxx免费| 免费无码又爽又黄又刺激网站 | 日本片免费观看一区二区| 国产偷v国产偷v亚洲高清| 亚洲首页国产精品丝袜| 日本系列1页亚洲系列| 国产精品区免费视频| 亚洲av日韩av天堂影片精品| 污污网站免费观看| 亚洲视频一区在线播放| 国产免费AV片在线观看播放| 久久久久久亚洲精品不卡| 成年免费a级毛片免费看无码| 黑人精品videos亚洲人| 18pao国产成视频永久免费| 伊人久久亚洲综合影院首页| 成人免费无码大片A毛片抽搐| 亚洲精品无码永久中文字幕| 爱丫爱丫影院在线观看免费| gogo全球高清大胆亚洲| 一级女性全黄生活片免费看| 亚洲色无码专区在线观看| 亚洲一区二区在线免费观看| 亚洲伊人久久大香线蕉结合| 国产一级大片免费看| 三上悠亚电影全集免费| 久久精品国产亚洲AV蜜臀色欲| 日本高清免费观看| 亚洲伦理一二三四| 免费看男女下面日出水视频| 在线毛片片免费观看| 67194在线午夜亚洲| 亚洲精品无码99在线观看| 久久亚洲欧美国产精品| 久久精品国产精品亚洲| 色片在线免费观看| 亚洲欧洲精品久久| 国产一区视频在线免费观看 | 中文在线日本免费永久18近| 亚洲国产韩国一区二区| 少妇亚洲免费精品|