【问题标题】:struts1 to struts2 migration message resourcestruts1 到 struts2 迁移消息资源
【发布时间】:2013-07-24 11:32:30
【问题描述】:

目前我们正在使用 Struts1,我们希望将 struts2(convention+annotation) 用于传入的项目。

我在使用 struts2 时遇到了关于消息资源的问题 在 Struts1 中,我们使用自定义的 MessageResourceFactory,它在 struts-config.xml 中配置

<message-resource factory="" param="">

我们在struts1中使用&lt;bean:message&gt;标签来调用消息。

我在struts2中找不到好方法

有什么推荐吗?

【问题讨论】:

  • 你想解决什么问题?
  • 感谢您的评论我想知道如何使用 struts2 实现相同的结果,我们的消息在数据库中

标签: struts2 migration struts1 struts-1


【解决方案1】:

没关系,我最终覆盖了 Struts2 中的 defaultTextProvider,在 struts.xml 中为它定义了一个 bean,并将它设置为应该使用的 TextProvider。

【讨论】:

  • 答案与所问的问题不匹配。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-03-27
  • 1970-01-01
  • 1970-01-01
  • 2015-12-20
  • 2020-01-23
  • 1970-01-01
相关资源
最近更新 更多