Struts_default.properties文件註釋

指定web應用的默認編碼集,可爲GBK/GB2312
struts.i18n.encoding=UTF-8
指定Struts2框架默認加載的配置文件
Struts..configuration.files=struts-default.xml,struts.xml,strtus-plugin.xml
指定Struts2應用加載用戶自定義的屬性文件,不覆蓋 struts.properties中的屬性
struts.custom.properties=application,org/apache/struts2/extension/custom
指定需要Strtus2處理的請求後綴,eg:*.do 或 *.action 或 *
struts.action.extension=action,

設置Struts2是否使用開發模式,開發時可設置爲true,應用出錯時顯示更多、更友好的出錯信息,便於調錯;發佈階段設爲false。
### includes:若爲true,以下兩個屬性也爲true(2.3以後)
### - struts.i18n.reload = true
### - struts.configuration.xml.reload = true
struts.devMode=false
設置是否每次HTTP請求到達時,系統都重新加載資源文件
struts.i18n.reload=false
設置是否每次HTTP請求到達時,系統都重新加載配置文件
struts.configuration.xml.reload=false
### Struts2 default.properties  or struts.properties
該屬性指定加載Struts2配置文件的配置文件管理器
struts.configuration=org.apache.struts2.config.DefaultConfiguration
指定web應用的默認Locale
# struts.locale=en_US
指定Struts2默認的ObjectFactoryBean,默認爲spring
# struts.objectFactory = spring
指定Spring框架的自動裝配模式,默認根據Bean的name屬性自動裝配
struts.objectFactory.spring.autoWire
 = name/type/auto/constructor
該屬性指定整合Spring框架時,是否緩存Bean實例,默認ture
struts.objectFactory.spring.useClassCache = true/false
### ensures the autowire strategy is always respected.
### valid values are: true, false (false is the default)
struts.objectFactory.spring.autoWire.alwaysRespect = false
指定Struts2的類型檢測機制,通常支持tiger和notiger兩個屬性值
#struts.objectTypeDeterminer = tiger
#struts.objectTypeDeterminer = notiger
指定處理multipart/form-data的MIME類型(文件上傳請求的框架)
# struts.multipart.parser=cos -->cos文件上傳框架
# struts.multipart.parser=pell -->pell上傳
struts.multipart.parser=jakarta -->common-fileupload文件上傳框架,默認jakarta
指定文件上傳的臨時保存路徑,默認:javax.servlet.context.tempdir
struts.multipart.saveDir=
指定文件最大上傳字節數,默認:2M
struts.multipart.maxSize=2097152
指定將HTTP請求映射到指定Action的映射器
#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
是否通過JAR文件提供靜態內容服務器,默認:true
struts.serve.static=true
設置瀏覽器是否緩存靜態內容,開發階段可設置爲false
struts.serve.static.browserCache=true
設置Strtus2是否支持動態方法調用
struts.enable.DynamicMethodInvocation = true
設置能否在Action name屬性中使用/,默認false
### <action name="*/*" method="{2}" class="actions.{1}"> to match "/foo/edit" or "/foo/save".
struts.enable.SlashesInActionNames = false
指定是否允許在Struts2標籤中使用表達式語法,默認true
struts.tag.altSyntax=true
指定視圖標籤默認的視圖主題,默認xhtml
struts.ui.theme=xhtml
/archive.ajax/archive.simple/archive.xhtml/css_xhtml/simple
指定視圖文件所需模版的位置,默認加載template路徑下的模版文件
struts.ui.templateDir=template
指定模版文件的後綴
struts.ui.templateSuffix=ftl  -->FreeMarker
                              vm   -->Velocity   jsp  -->jsp模版
指定velocity框架所需的velocity.properties文件的位置
struts.velocity.configfile = velocity.properties
指定velocity框架的Context位置,多個Context用,隔開
struts.velocity.contexts =
指定velocity框架的toolbox位置
struts.velocity.toolboxlocation=
指定Web應用所在的監聽端口
struts.url.http.port = 80
指定Web應用的加密服務端口
struts.url.https.port = 443
指定Struts2生成URL時是否包含請求參數
struts.url.includeParams = none -->不包含
                           get -->僅包含get請求類型的提交
                           all -->包含全部
指定Struts2所需的國際化資源文件,多個用,隔開
# struts.custom.i18n.resources=testmessages,testmessages2
由於某些Java EE服務器(WebLogic,Orion,OC4J),不支持HttpServletRequst調用getParameterMap()方法,此時可設置該屬性值爲true來解決問題
struts.dispatcher.parametersWorkaround = false
指定Strtus2使用的FreeMarker管理器,默認爲Strtus2內建的FreeMarker管理器
#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager
是否隱藏FreeMarkder模版
struts.freemarker.templatesCache=false
### Enables caching of models on the BeanWrapper
struts.freemarker.beanwrapperCache=false
### See the StrutsBeanWrapper javadocs for more information
struts.freemarker.wrapper.altMap=true
### maxStrongSize for MruCacheStorage for freemarker
struts.freemarker.mru.max.strong.size=100
指定XSLT Result 是否使用樣式表緩存
struts.xslt.nocache=false
### Whether to always select the namespace to be everything before the last slash or not
struts.mapper.alwaysSelectFullNamespace=false
### Whether to allow static method access in OGNL expressions or not
struts.ognl.allowStaticMethodAccess=false
### Whether to throw a RuntimeException when a property is not found
### in an expression, or when the expression evaluation fails
struts.el.throwExceptionOnFailure=false
### Logs as Warnings properties that are not found (very verbose)
struts.ognl.logMissingProperties=false
### Caches parsed OGNL expressions, but can lead to memory leaks
### if the application generates a lot of different expressions
struts.ognl.enableExpressionCache=true

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章