Maintenance is coming...
Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to make application start up action hook in liferay DXP?
I want to ask - How to make application start up action hook in liferay DXP? Please help..
Actually it is easier than that...
Just create an @Component class. Inside of the class, add the following:
@Reference(target = ModuleServiceLifecycle.PORTAL_INITIALIZED, unbind = "-")
protected void setModuleServiceLifecycle(ModuleServiceLifecycle moduleServiceLifecycle) { }
Then build out your logic in an @Activate method. This method will only be invoked once the module has started, the module will only start after all references have been satisfied, and the PORTAL_INITIALIZED instance is only available to satisfy after the portal startup is complete.
Copyright © 2026 Liferay, Inc
• Privacy Policy
Powered by Liferay™
Node: liferay-5bbdbc977c-s2qbv:8080: