将 portlet 与 grails 应用程序上下文连接起来,还是通过 grails 部署多个 portlet?
我目前有一个通过 liferay 部署的 Grails 应用程序。现在,我需要构建一些 portlet,但我不确定公开 grails 域对象和服务的最佳方法是什么。
你会怎样做呢?
理想情况下,我可以直接在 grails 应用程序中构建 portlet,或者在部署到不同的战争中时以某种方式将两者连接在一起。
I currently have a grails application that gets deployed through liferay. Now, I need to build some portlets, but I'm unsure what the best way is to expose the grails domain objects and services.
How would you go about doing this?
Ideally, I could either build my portlets directly within the grails application or somehow wire the two together when deployed in different wars.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几周前,我发布了一个 GateIn Portlet 插件,它更新了 PortletsPlugin 并使其可以与上次一起使用Grails (1.3.7) 和 Spring MVC (3.0.5)。如果您愿意,我可以将我的更改向后移植到原始 portles 插件及其 LR 实现。你用的是哪个LR版本?
如何公开域对象更多地取决于您的环境设计选择。最简单的方法是将所有 portlet 放在单个 grails 应用程序中。如果您的 portlet 没有逻辑连接在一起,请在单独的战争中进行。但是,如果您仅使用域类来输出一些文本,那么编写仅使用 GORM 的标准 Java servlet 可能会更好地提高性能和管理效率。
Some weeks ago I published an GateIn Portlet plugin that updates the PortletsPlugin and make it usable with last Grails (1.3.7) and Spring MVC (3.0.5). If you like, I can back-port my changes to the original portles plug-in and its LR implementation. Which LR version do you use?
How to expose you domain objects its more about your environment design choice. The simplest way is to have all portlets in inside a single grails app. If your portlets are not logical connected together do it in separate wars. But if you use the domain classes just to output some text, maybe is better for performance and administration to write a standard Java servlet that uses only GORM.
有 Portlets 插件,但它没有得到积极维护(我几年前编写了原始版本) 。您可以尝试一下,并在需要时进行升级/修补。
否则我猜你可以创建一个标准的 Java portlet WAR 并通过 REST 调用 grails?
干杯
李
There is the Portlets Plugin but it is not actively maintained (I wrote the original version a couple of years ago). You could have a go with that and upgrade/patch where required.
Otherwise I guess you could create a standard Java portlets WAR and call grails via REST?
cheers
Lee