Struts2 常量配置

### 指定加載struts2配置文件管理器,默認爲org.apache.struts2.config.DefaultConfiguration
### 開發者可以自定義配置文件管理器,該類要實現Configuration接口,可以自動加載struts2配置文件。
# struts.configuration=org.apache.struts2.config.DefaultConfiguration

### 設置默認的locale和字符編碼
# struts.locale=en_US
struts.i18n.encoding=UTF-8


### 指定struts的工廠類
# struts.objectFactory = spring

### 指定spring框架的裝配模式
### 裝配方式有: name, type, auto, and constructor (name 是默認裝配模式)
struts.objectFactory.spring.autoWire = name

### 該屬性指定整合spring時,是否對bean進行緩存,值爲true or false,默認爲true.
struts.objectFactory.spring.useClassCache = true

### 指定類型檢查
#struts.objectTypeDeterminer = tiger
#struts.objectTypeDeterminer = notiger

### 該屬性指定處理 MIME-type multipart/form-data,文件上傳
# struts.multipart.parser=cos
# struts.multipart.parser=pell
struts.multipart.parser=jakarta
# 指定上傳文件時的臨時目錄,默認使用 javax.servlet.context.tempdir 
struts.multipart.saveDir=
struts.multipart.maxSize=2097152

### 加載自定義屬性文件 (不要改寫struts.properties!)
# struts.custom.properties=application,org/apache/struts2/extension/custom

### 指定請求url與action映射器,默認爲org.apache.struts2.dispatcher.mapper.DefaultActionMapper
#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper

### 指定action的後綴,默認爲action
struts.action.extension=action

### 被 FilterDispatcher使用
### 如果爲 true 則通過jar文件提供靜態內容服務. 
### 如果爲 false 則靜態內容必須位於 <context_path>/struts
struts.serve.static=true

### 被 FilterDispatcher使用
### 指定瀏覽器是否緩存靜態內容,測試階段設置爲false,發佈階段設置爲true.
struts.serve.static.browserCache=true

### 設置是否支持動態方法調用,true爲支持,false不支持.
struts.enable.DynamicMethodInvocation = true

### 設置是否可以在action中使用斜線,默認爲false不可以,想使用需設置爲true.
struts.enable.SlashesInActionNames = false

### 是否允許使用表達式語法,默認爲true.
struts.tag.altSyntax=true


### 設置當struts.xml文件改動時,是否重新加載.
### - struts.configuration.xml.reload = true
### 設置struts是否爲開發模式,默認爲false,測試階段一般設爲true.
struts.devMode = false

### 設置是否每次請求,都重新加載資源文件,默認值爲false.
struts.i18n.reload=false

###標準的UI主題
### 默認的UI主題爲xhtml,可以爲simple,xhtml或ajax
struts.ui.theme=xhtml
###模板目錄
struts.ui.templateDir=template
#設置模板類型. 可以爲 ftl, vm, or jsp
struts.ui.templateSuffix=ftl

###定位velocity.properties 文件.  默認 velocity.properties
struts.velocity.configfile = velocity.properties

### 設置velocity的context.
struts.velocity.contexts =

### 定位toolbox.
struts.velocity.toolboxlocation=

### 指定web應用的端口.
struts.url.http.port = 80
### 指定加密端口
struts.url.https.port = 443
### 設置生成url時,是否包含參數.值可以爲: none, get or all
struts.url.includeParams = get

### 設置要加載的國際化資源文件,以逗號分隔.
# struts.custom.i18n.resources=testmessages,testmessages2

### 對於一些web應用服務器不能處理HttpServletRequest.getParameterMap()
### 像 WebLogic, Orion, and OC4J等,須設置成true,默認爲false.
struts.dispatcher.parametersWorkaround = false

### 指定freemarker管理器
#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager

### 設置是否對freemarker的模板設置緩存
### 效果相當於把template拷貝到 WEB_APP/templates.
struts.freemarker.templatesCache=false

### 通常不需要修改此屬性.
struts.freemarker.wrapper.altMap=true

### 指定xslt result是否使用樣式表緩存.開發階段設爲true,發佈階段設爲false.
struts.xslt.nocache=false

### 設置struts自動加載的文件列表.
struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml

### 設定是否一直在最後一個slash之前的任何位置選定namespace.
struts.mapper.alwaysSelectFullNamespace=false

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