struts2的struts.properties文件中的配置属性

本文详细介绍了Struts2框架中的各种配置选项,包括如何设置Action的后缀、配置文件的加载方式、国际化设置、文件上传处理等内容。这些配置项对于理解和定制Struts2应用程序的行为至关重要。

按照字母排序

struts.action.extension           The URL extension to use to determine if the request is meant for a Struts action            用URL扩展名来确定是否这个请求是被用作Struts action,其实也就是设置action的后缀, 例如login.do的\'do\'字,多个后缀以,隔开

struts.configuration           The org.apache.struts2.config.Configuration implementation class              指定加载strut2配置文件的配置文件管理器, 默认值是 org.apache.struts2.config.Configuration接口名

struts.configuration.files           A list of configuration files automatically loaded by Struts         struts自动加载的一个配置文件列表,多个配置文件之间以,隔开,默认值是struts-default.xml,struts- plugin.xml,struts.xml

struts.configuration.xml.reload           Whether to reload the XML configuration or not            是否自动重新加载xml配置(true,false),默认值是false

struts.continuations.package            The package containing actions that use Rife continuations            含有actions的完整连续的package名称

struts.custom.properties           Location of additional configuration properties files to load            加载附加的配置文件的位置,该文件不能覆盖struts.properties文件中指定的属性,多个自定义属性文件以,隔开

struts.custom.i18n.resources           Location of additional localization properties files to load            加载附加的国际化属性文件(不包含.properties后缀),多个资源文件以,隔开

struts.devMode           Whether Struts is in development mode or not            是否为struts开发模式,默认值是false,开发阶段使用true,发布阶段使用false,区别在于true的时候会在应用出错时显示更多、更友 好的出错提示。

struts.dispatcher.parametersWorkaround           Whether to use a Servlet request parameter workaround necessary for some versions of WebLogic             对于某些javaEE服务器,不支持HttpServletRequest调用getParameterMap()方法,可以设置该属性值为true来解 决。默认值是false。对于Weblogic、Orion和OC4J服务器,通常设置为true

struts.enable.DynamicMethodInvocation           Allows one to disable dynamic method invocation from the URL             是否允许动态方法调用,默认值是true,关闭动态方法调用,设置为false

struts.enable.SlashesInActionNames                                                                                                                                          是否允许在Action名中使用斜线,默认值是false,允许使用设置为true

struts.freemarker.manager.classname           The org.apache.struts2.views.freemarker.FreemarkerManager implementation class           指定struts2使用的FreeMarker管理器,默认值是 org.apache.struts2.views.freemarker.FreemarkerManager接口名

struts.freemarker.wrapper.altMap                                                                                                                                                            默认值是true

struts.i18n.encoding           The encoding to use for localization messages            国际化信息内码,中文设置为GBK或GB2312

struts.i18n.reload           Whether the localization messages should automatically be reloaded            设置是否每次HTTP请求到达时,系统都重新加载资源文件,默认值是false,开发阶段设置为true,发布阶段设置为false,是否国际化信息自动 加载

struts.locale           The default locale for the Struts application            默认的国际化地区信息

struts.mapper.class           The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class             org.apache.struts2.dispatcher.mapper.ActionMapper接口(默认)      指定将http请求映射到指定Action的映射器,默认映射器根据请求的前缀与Action的name属性完成映射

struts.multipart.maxSize           The maximize size of a multipart request (file upload)            multipart请求信息的最大字节数(文件上传用)

struts.multipart.parser           The org.apache.struts2.dispatcher.multipart.           MultiPartRequest parser implementation for a multipart request (file upload)           专为multipart请求信息使用的 org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上传用)支持 cos/pell/jakarta等属性,默认值是jakarta

struts.multipart.saveDir           The directory to use for storing uploaded files            设置存储上传文件的临时目录夹,默认值是javax.servlet.context.tempdir

struts.objectFactory           The com.opensymphony.xwork2.ObjectFactory implementation class           指定struts2默认的ObjectFactory Bean, com.opensymphony.xwork2.ObjectFactory接口(默认值是spring)

struts.objectFactory.spring.autoWire           Whether Spring should autoWire or not            是否自动绑定Spring,自动装配模式,默认属性是name

struts.objectFactory.spring.useClassCache           Whether Spring should use its class cache or not            是否spring应该使用自身的cache,是否缓存bean实例,默认值是true

struts.objectTypeDeterminer           The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class             com.opensymphony.xwork2.util.ObjectTypeDeterminer接口,指定struts2的类型检测机制,通常支持tiger和notiger两个属性值

struts.serve.static.browserCache   If static content served by the Struts filter should set browser caching header properties or not     是否struts过滤器中提供的静态内容应该被浏览器缓存在头部属性中,开发中设置为false,每次请求都能获得最新响应

struts.serve.static           Whether the Struts filter should serve static content or not            是否struts过滤器应该提供静态内容,默认属性值是true

struts.tag.altSyntax           Whether to use the alterative syntax for the tags or not            是否可以用表达式语法替代tags,默认值是true

struts.ui.templateDir           The directory containing UI templates            指定视图主题所需要模板文件的位置,默认值是template,即默认加载template路径下的模板文件

struts.ui.theme           The default UI template theme            指定视图标签默认的视图主题,默认值是xhtml

struts.url.http.port           The HTTP port used by Struts URLs            指定web应用所在的监听端口

struts.url.https.port           The HTTPS port used by Struts URLs            指定web应用的加密服务端口

struts.url.includeParams           The default includeParams method to generate Struts URLs           指定struts2生成url时是否包含请求参数,该属性接受none、get和all三个属性值,分别对应于不包含、仅包含get类型请求参数和包含全部请求参数

struts.velocity.configfile           The Velocity configuration file path           指定Velocity框架所需的velocity.properties文件的位置。默认值是velocity.properties

struts.velocity.contexts           List of Velocity context names           指定Velocity框架的Context位置,多个Context之间以,隔开

struts.velocity.manager.classname           org.apache.struts2.views.velocity.VelocityManager implementation class            org.apache.struts2.views.velocity.VelocityManager接口名

struts.velocity.toolboxlocation           The location of the Velocity toolbox           指定velocity工具盒的位置

struts.xslt.nocache           Whether or not XSLT templates should not be cached            指定XSLT模版是否使用样式表缓存,开发阶段用true,发布阶段用false

【电动汽车充电站有序充电调度的分散式优化】基于蒙特卡诺和拉格朗日的电动汽车优化调度(分时电价调度)(Matlab代码实现)内容概要:本文介绍了基于蒙特卡洛和拉格朗日方法的电动汽车充电站有序充电调度优化方案,重点在于采用分散式优化策略应对分时电价机制下的充电需求管理。通过构建数学模型,结合不确定性因素如用户充电行为和电网负荷波动,利用蒙特卡洛模拟生成大量场景,并运用拉格朗日松弛法对复杂问题进行分解求解,从而实现全局最优或近似最优的充电调度计划。该方法有效降低了电网峰值负荷压力,提升了充电站运营效率与经济效益,同时兼顾用户充电便利性。 适合人群:具备一定电力系统、优化算法和Matlab编程基础的高校研究生、科研人员及从事智能电网、电动汽车相关领域的工程技术人员。 使用场景及目标:①应用于电动汽车充电站的日常运营管理,优化充电负荷分布;②服务于城市智能交通系统规划,提升电网与交通系统的协同水平;③作为学术研究案例,用于验证分散式优化算法在复杂能源系统中的有效性。 阅读建议:建议读者结合Matlab代码实现部分,深入理解蒙特卡洛模拟与拉格朗日松弛法的具体实施步骤,重点关注场景生成、约束处理与迭代收敛过程,以便在实际项目中灵活应用与改进。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值