Best advantages of using OSGi is that you can divide your components in small micro services and as when required module's can use each other's services.
Let say if you have module A which depends on module B then can specify module dependency in bnd.bnd file of module A as below.
You can also limit the services that you want to share with the other modules. In above example module B might be having lots of service but you may want to share only specific service with other modules. You can specify list of packages you want to share with other module using below in bnd.bnd file.
How To Include Static Resources (CSS/JS/Images) In Liferay OSGI Module
How To Include Custom Portlet In Theme - Liferay DXP
How To Specify External Jar Dependency In Liferay DXP
How To Disable Re-Indexing Of All Journal Article Versions In Liferay DXP
Let say if you have module A which depends on module B then can specify module dependency in bnd.bnd file of module A as below.
compileOnly project(":modules:test-module-a")
You can also limit the services that you want to share with the other modules. In above example module B might be having lots of service but you may want to share only specific service with other modules. You can specify list of packages you want to share with other module using below in bnd.bnd file.
Export-Package: \Read other posts on Liferay DXP
com.custom.common.service.bean,\
com.custom.common.service.client,\
com.custom.common.service.exception,\
com.custom.common.service.constants
How To Include Static Resources (CSS/JS/Images) In Liferay OSGI Module
How To Include Custom Portlet In Theme - Liferay DXP
How To Specify External Jar Dependency In Liferay DXP
How To Disable Re-Indexing Of All Journal Article Versions In Liferay DXP
0 comments:
Post a Comment