应用程序中的 EAR 切换

发布于 2024-12-09 20:23:46 字数 565 浏览 0 评论 0原文

我们有这样的场景,我们希望项目有不同的版本。 我们称之为R1.0和R2.0。 首先,我们向所有 5 家工厂发布 R1.1。 R2.0将首先发布到2个工厂,然后发布到剩余的3个工厂。 有些用户可能可以访问这两个工厂,而有些用户则不能。 要求是,一旦具有多个工厂访问权限的用户登录,他应该被引导到具有更高版本(例如 R2.0)的工厂,并且从那里他将可以选择切换回另一个具有较低版本(例如 R1.0)的工厂。

为了处理这种情况,我们提出了以下方法。 我们将有 2 个 EAR,一个用于 R1.0,另一个用于 R2.0。 如果 EAR 2.0 已发布,请求将始终发送到 EAR 2.0。 我们将维护一个过滤器类,如果用户有权访问多个工厂,它将检查数据库。如果不是,并且他有权访问的工厂是 R1.0,则只需重定向到 EAR 1.0 ,否则他将仅处于 EAR 2.0 中。

此外,一旦他访问 EAR 2.0 屏幕,就会出现 2 个屏幕中的下拉菜单,他可以从其中切换到具有较低版本的设备。因此,我们还需要从那里将他重定向到 EAR 1.0。

我们计划使用所需参数进行简单的发送重定向到另一个 EAR 文件。 请告诉我们正确的做法应该是什么,或者我们采取的做法是正确的。

we are having a scenario like this where we want to have different releases of our project.
We call it as R1.0 and R2.0.
First we are releasing R1.1 to all 5 plants. R2.0 will be released first to 2 plants and then remaining 3 plants.
It is possible that some users will have access to both the plants and some may not.
The requirement is that once a user having multiple plant access logs in he should be directed to plant having higher version let say R2.0 and from there he will have an option to switch back to another plant having lower version say R1.0.

To handle this scenario we have come up with the following approach.
we will have 2 EARs one for R1.0 and another one for R2.0.
The requests will always come to the EAR 2.0 if that is released.
We will maintain a filter class which will check in DB if the user is having access to multiple plants. if no and the plant to which he has access is R1.0 then simply redirect to EAR 1.0 , otherwise he will be in EAR 2.0 only.

Also once he is accessing EAR 2.0 screens there will be a drop down in 2 screens from where he can switch to plant having lower version . so from there also we need to redirect him to EAR 1.0.

We are planning for a simple sendredirect with required parameters to the another EAR file.
Please let us know what should be the correct approach, or the approach we have taken is correct.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文