Welcome 微信登录

首页 / 软件开发 / JAVA / Struts2的properties配置文件详解

Struts2的properties配置文件详解2011-04-23###指定加载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,andconstructor(name是默认装配模式)

struts.objectFactory.spring.autoWire=name

###该属性指定整合spring时,是否对bean进行缓存,值为trueorfalse,默认为true.

struts.objectFactory.spring.useClassCache=true

###指定类型检查

#struts.objectTypeDeterminer=tiger

#struts.objectTypeDeterminer=notiger

###该属性指定处理MIME-typemultipart/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