Showing results for 
Search instead for 
Did you mean: 

What is the difference between siteConfigService.getProperty() and configurationService.getConfiguration().getString()

Active Participant
0 Kudos

Hi Friends

Can you anyone help me understand the difference between reading the properties using




Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi . siteConfigService is used to lookup a site specific configuration property. For example you have two base stores with id "myBaseStore1" and "myBaseStore2" appropriately, and if you want to have one property for two different base stores with different values, you need to use the service siteConfigService and to declare a respective property in adding base store id as suffix, for example

 sessionTimeout.myBaseStore1 = 1000
 sessionTimeout.myBaseStore2 = 2000

And you can do siteConfigService.getProperty("sessionTimeout"), and depending on current base store the appropriate property value will be returned. configurationService will search only property with name "sessionTimeout"

P.S. Actually siteConfigService is more flexible, lets look at source code of de.hybris.platform.acceleratorservices.config.impl.DefaultSiteConfigService

Answers (0)