To configure a settings listener in a module, add the followed code to moduleApplicationContext.xml:
<!-- Add Settings listeners --> <bean id="yourModuleEventListeners" parent="openmrsEventListeners"> <property name="SettingsListeners"> <list value-type="org.openmrs.api.SettingsListener" merge="true"> <bean class="org.openmrs.module.yourmodule.YourSettingsListener" /> <bean class="org.openmrs.module.yourmodule.AnotherSettingsListener" /> </list> </property> </bean>
Be sure to change the "yourModuleEventListeners" id to a custom string
Learn more about Settings here