【发布时间】:2013-06-23 22:19:03
【问题描述】:
我将一些动作打包在jar文件中,并将这些文件放在WEB-INF/lib中。 另外,我已经配置了 struts.convention.action.includeJars 常量。但我发现约定插件不会扫描 WEB-INF/lib 中的 jar。请参阅 org.apache.struts2.convention.PackageBasedActionConfigBuilder。
我的环境: - Tomcat 6.0.5 - struts2.3.14.3 GA - 春季 3.0.5
convention 插件如何扫描我的罐子?是否有任何方法可以重用 jar 文件中的操作。
【问题讨论】:
-
它通过提供一个常量值进行扫描,该常量值用于将 jar 名称转换为正则表达式。你使用了什么 jar 名称或表达方式?
-
但问题是约定插件不扫描 web-inf/lib,它只扫描 tomcat/lib 和 web-inf/classes。尝试添加struts.convention.action.fileProtocols=jar,zip
标签: struts2 jar convention