从 Struts2 迁移到 Spring MVC

发布于 2024-09-02 14:36:14 字数 192 浏览 2 评论 0原文

场景:一个相当成熟的项目使用Struts2和Spring和Hibernate。我说成熟是因为它已经持续了一段时间并且已经写了很多 struts 动作。

假设我们想从项目中删除 Struts2,转而完全依赖 Spring MVC,而不需要重写整个项目。

这是应该考虑的事情吗? 有没有任何迁移指南? 有人以前这样做过并想警告我不要这样做吗?

Scenario: A fairly mature project uses Struts2 and Spring and Hibernate. I say mature because it has been going on a for a while and there are many struts actions written already.

Suppose we wanted to remove Struts2 from the project and instead depend entirely on Spring MVC without rewriting the entire project.

Is this something that should even be considered?
Are there any migration guides out there?
Has anyone done this before and would like to warn me against it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

十六岁半 2024-09-09 14:36:14

如果它没有坏,就不要修理它。您很可能有比不会为产品增加任何价值(并且肯定会引入一些错误)的迁移更好的事情要做。如果我是企业,我永远不会购买这样的迁移(收益接近于零)。

If it ain't broke, don't fix it. You have very likely better things to do than a migration that won't add any value to the product (and will certainly introduce some bugs). If I were the business, I would never buy such a migration (with close to zero benefits).

若无相欠,怎会相见 2024-09-09 14:36:14

我想问:您认为 Spring MVC 有哪些优势是 Struts 2 无法实现的?
如果至少没有一些“非常热门”的功能,或者节省的时间足以克服迁移所需的时间,那么最好坚持使用现有的功能。

I have to ask: What advantages do you see with Spring MVC that aren't being fulfilled by Struts 2?
If there's not at least a handful of "smoking hot" features, or the amount of time saved is more than enough to overcome the time taken for the migration in the first place then it's probably best to stick with what you have.

诗笺 2024-09-09 14:36:14

你可以慢慢做。 Struts 是一个MVC 框架。应用程序的其余部分(业务层和数据层)是可以由操作类调用的类。 Struts 是一个基于插件的架构,您可以轻松地在 struts 配置文件中定义插件。

查看此链接。这可能会有所帮助。

You can do it slowly. Struts is a MVC framework. The rest of your application (business and data tiers) are classes which can be invoked by action classes. Struts is a plugin based architecture and it is easy for you to define a plugin in struts configuration file.

Take a look at this link. This may help.

涙—继续流 2024-09-09 14:36:14

随着 Struts2 安全漏洞的频繁暴露和报告,这项任务变得更加重要。

With Struts2 security vulnerabilities being exposed and reported often, this task takes on more importance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文