liferay / portletmvc4spring

Apache License 2.0
17 stars 21 forks source link

Support for Spring Portlets developed on Portlet API 2.0 #31

Open hdecoded opened 1 year ago

hdecoded commented 1 year ago

I was recently assigned to research a way to support Spring Portlets on Spring Framework Version 5.0 on a Portal server in my organization.

As part of my research, I came across this project and we are planning on using this project to support Spring Portlets.

As part of my POC, I created a portlet using Liferay Development studio and tried to deploy it on our portal but since the portlet and portletmvc4spring are using Portlet 3.0 API we were unable to deploy the portlet.

Our Portal is currently only supporting Portlet API 2.0 and has no support for portlet API 3.0. All our customers are also using portlets that are only developed on Portlet API 2.0.

Could someone please help me out with the following questions:

  1. Is it possible to support Portlet API 2.0 and use this project in our portal without adding support for Portlet API 3.0?
  2. If it is not possible to support Spring MVC Portlets developed on Portlet API 2.0 we are discussing supporting Portlet API 3.0. But would like to know if the existing Spring MVC portlets developed using Portlet API 2.0 will directly work with Portlet 3.0 or will there be any changes required.

Any quick help would be appreciated.

ngriffin7a commented 1 year ago

Hi @hdecoded thanks so much for reaching out. Liferay has no plans to have PortletMVC4Spring support Portlet 2.0, but you are certainly free to fork the project and create a branch that compiles against the Portlet 2.0 API by changing this line: https://github.com/liferay/portletmvc4spring/blob/master/pom.xml#L148

There will be compile failures that you would need to fix, and perhaps some Portlet 3.0 specific classes that would need to be deleted, such as: https://github.com/liferay/portletmvc4spring/blob/master/framework/src/main/java/com/liferay/portletmvc4spring/multipart/StandardPortletMultipartResolver.java#L65

May I ask what version of Liferay are you using? And are you CE (Community Edition) or DXP?

hdecoded commented 1 year ago

Hi @ngriffin7a,

Thank you so much for the quick response. I will try creating a branch that compiles against the portlet 2.0 API as you suggested.

I am currently using the Liferay CE Portal Verison 7.4.3.54-ga54 for creating and testing the portlets. But we are planning on using the portletmvc4spring jars with our Organisation's own Portal.

Thanks again for the support.