freemaker中設定檔freemarker.properties詳解

來源:互聯網
上載者:User

標籤:檔案   for   ar   時間   ef   har   ui   on   

classic_compatible=true              ##如果變數為null,轉化為空白字串,比如做比較的時候按照Null 字元做比較
whitespace_stripping=true          ##去掉多餘的空格,非常有用
##模版更新事件,設定為1秒,正式環境設定為3600秒
#template_update_delay=3600
template_update_delay=1        ##模版更新時間,這裡配置是1秒更新一次,正式環境,模版不會改變,可以將這個值設很大,提高效率.就是被這個參數害死了.老是不更新.
locale=zh_CN            ##中國
default_encoding=utf-8   ##編碼utf8
url_escaping_charset=utf-8  ##url編碼utf8
date_format=yyyy-MM-dd   ##顯示日期格式
time_format=HH:mm:Ss       ##顯示時間格式
datetime_format=yyyy-MM-dd  ##顯示日期格式
number_format=\#0.\#\#\#\#\#  ##數字顯示格式hi.
#template_update_delay=1
datetime_format=yyyy-MM-dd HH:mm:ss
date_format=yyyy-MM-dd
time_format=HH:mm:ss
number_format=0.######;
boolean_format=true,false
auto_import="/common/index.ftl" as ui
whitespace_stripping=true
default_encoding=UTF-8
tag_syntax=auto_detect ##設定標籤的類型
url_escaping_charset=UTF-8
裡面大部分都不解釋了,就解釋一個,
auto_import="/common/index.ftl" as ui 這個表示每個freemarker的視圖頁面都會自動引入這個ftl檔案。裡面定義的就是一些宏,如text文字框,各種form元素


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.