简体   繁体   English

使用grails应用程序上下文连接portlet,还是通过grails部署多个portlet?

[英]Wiring portlets with a grails application context, or deploying multiple portlets through grails?

I currently have a grails application that gets deployed through liferay. 我目前有一个通过liferay部署的grails应用程序。 Now, I need to build some portlets, but I'm unsure what the best way is to expose the grails domain objects and services. 现在,我需要构建一些portlet,但我不确定暴露grails域对象和服务的最佳方法是什么。

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. 理想情况下,我可以直接在grails应用程序中构建我的portlet,或者在不同的战争中部署时将两者连接在一起。

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). 几周前,我发布了一个GateIn Portlet插件 ,它可以更新PortletsPlugin并使其可用于最后的Grails(1.3.7)和Spring MVC(3.0.5)。 If you like, I can back-port my changes to the original portles plug-in and its LR implementation. 如果您愿意,我可以将我的更改后端移植到原始portles插件及其LR实现。 Which LR version do you use? 你使用哪个LR版本?

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. 最简单的方法是将所有portlet放在单个grails应用程序中。 If your portlets are not logical connected together do it in separate wars. 如果您的portlet没有逻辑连接在一起,请在单独的战争中进行。 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. 但是,如果您只使用域类来输出一些文本,那么编写仅使用GORM的标准Java servlet可能更适合性能和管理。

There is the Portlets Plugin but it is not actively maintained (I wrote the original version a couple of years ago). Portlets插件,但没有积极维护(几年前我写了原始版本)。 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? 否则我猜你可以创建一个标准的Java portlets WAR并通过REST调用grails?

cheers 干杯

Lee 背风处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过grails中的自定义报告上下文连接Spring bean - Wiring spring beans through custom reporting context in grails 将Activiti作为Grails中的Spring Bean接线 - Wiring Activiti as a Spring Bean in Grails 在grails应用程序中设置父应用程序上下文 - Setting parent application context in a grails application 导入就地插件的Grails应用程序上下文 - Import Grails application context of inplace plugin 使用Grails渲染插件时无接线豆 - No wiring beans when using Grails Rendering Plugin Liferay具有相同嵌入式Neo4j DB的多个Portlet - Liferay multiple portlets running with same embedded neo4j db Portlet的Spring @ActionMapping语法 - Spring @ActionMapping syntax for Portlets 在tomcat上部署grails应用程序时,创建名称为'transactionManagerPostProcessor'的bean时出错 - Error creating bean with name 'transactionManagerPostProcessor' while deploying grails application on tomcat 在Glassfish4上部署Grails 2.5.1应用程序时出错 - Error while deploying Grails 2.5.1 application on Glassfish4 将Grails应用程序部署到Tomcat时,javax.websocket.DeploymentException - javax.websocket.DeploymentException when deploying Grails application to Tomcat
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM