Overview
​
In SAP Hybris, a property file is used to configure various aspects of the Hybris Commerce platform. Properties files are typically used to store configuration settings that control the behavior of the application. These settings can include database connection details, system settings, and other configuration parameters.
Hybris uses its own configuration system to load properties from these files, and you can access these properties programmatically in your extensions and code using the ConfigurationManager.
​
​
​
Properties File Description
We have mainly three types of properties file in hybris. This file are divided on the basis of the name and location.
​
1) Project.properties file in platform folder:
-
This file is placed inside the platform folder.
-
This file contains the properties related to database connection, tomcat build options and debug options.
-
This file has the lowest precedence below the project.properties in each extension and local.properties in the config folder.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2) Project.properties file in each extension:
-
This file is placed inside each extension.
-
This file contains the properties related to specific extension. This property file will have the configurations which are not going to change frequently.
-
This file has the precedence higher than the project.properties in platform and lower precedence than the local.properties in the config folder.
-
The configuration entry in this file can override the configuration with same name in project.properties file of platform folder.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3) Local.properties file in config folder:
-
This file is placed inside config folder.
-
This file contains the configurations specific to environment (DEV,UAT, Prod). We can have multiple versions of this file which will be picked dynamically in the build server on the basis of the target env.
-
This file contains the configurations whose value changes from env to env. For Example: DB URL, Integration credentials, Integration URLs and Tomcat memory utilization settings.
-
This file has the highest priority.
-
The configuration entry in this file can override the configuration with same name in project.properties file of platform and project.properties file of any extension.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
Properties File Priority
​
Each Property file have the different priority. This features comes in to picture when we have same configuration key present in the multiple locations. The following priority order is followed in that case.
​
​
​
​
​
​
​
​
Configuration Properties in HAC
We can add or remove the configurations on the online server using hac. The values will be picked or note in the server runtime code its depends on the way of utilization. Sometimes we load the configuration from xml during server start up those value we can not change from HAC. Some configuration are utilized in the code by using configuration services provided by hybris, these values will reflect if we do the changes on runtime.
​
For configuration changes from hac we have following steps:
1) Open the hac by https://electronics.local:9002/hac
2) Go to the platform tab
3) Go to the configuration tab
4) Add/Remove/Change the values from screen as shown in the following screenshot.
​
​
​
​
​




