Is it possible to define the order of initializati

2019-07-16 13:50发布

问题:

I would like to specify the order of initialization of portlets when the portal server starts.

Is it possible?

回答1:

Yes, it is possible.

You can specify the order of deployment of the plugins by setting the required-deployment-contexts property in liferay-plugin-package.properties of the dependent portlet.

Examples:

If your portlet my-custom-portlet depends on other plugins then you can specify as follows:

1) For single dependency required-deployment-contexts:

required-deployment-contexts=my1-other-portlet

2) For multiple required-deployment-contexts:

required-deployment-contexts=\
    my-other-theme,\
    my1-other-portlet,\
    my-other-hook,\
    my2-other-portlet

Hope this helps.



回答2:

Yes, you can specify the order of deployment over the definition of portlet dependency. Set the required-deployment-contexts=MyPrevPortlet in liferay-plugin-package.properties.