author.config value to controler

manikanthar1295

22-05-2019

Hi Team,

How i can define some values in config.author instance.

how i can get that value in any java file. is there api to get the instance configuration values in AEM.

Regards

Manikantha R

Accepted Solutions (1)

Accepted Solutions (1)

Arun_Patidar

MVP

22-05-2019

Hi,

Please check

Configuring OSGi

http://aempodcast.com/2016/apache-sling/demonstrate-slingosgiconfig-runmodes/#.XOUWAm4zY2w

Yes, there is a API to get OSGI config, check below example for factory config, you can do same for single config instance by changing filter in code.

aem63app-repo/GetFactoryConfigServlet.java at master · arunpatidar02/aem63app-repo · GitHub

@Reference
private ConfigurationAdmin configAdmin;

private static final String filter = "(service.pid=org.apache.sling.security.impl.ReferrerFilter)";

Configuration[] configurations = configAdmin.listConfigurations(filter);

Answers (0)