Custom OSGi settings in Liferay 7.2
Custom OSGi settings implementation Overview This tutorial show how to implement configurable OSGi settings for your project. OSGi module implementation Problem formulation Let's say, you need an account configuration for external system access with values: "LifeDev User" - user name; "LifeDev Password" - password. And you need it to be displayed under custom category in System Settings. Module Creation Create module with the following structure: LifeDevConfigurationCategory - settings category; LifeDevAccountConfiguration - OSGi settings; LifeDevConfigurationKeys - constants; Language.properties - resource bundle. Dependencies The list of dependencies in build.gradle : dependencies { compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "4.0.0" ...