Properties Files in Hybris


Lets understand the properties files in Hybris


We basically have3 main properties files in Hybris to put the configuration values in the form of key value pair.

1) project.properties file in platform folder

2) project.properties file in each extension

3) local.properties file in config folder

Project.properties file in platform folder


This file contains the basic platform related configuration values which includes Database related propertis,XSS filter properties etc.

project.properties file in each extension


This file contains the configuration values specific to an extension.

Each and every extension will have their own project.properties file.

And any properties specified in this file will take more precedence than project.properties file in platform folder.

Local.properties file in config folder


This file contains the properties which are common across all the extensions.

If we define the properties in this file, any extension in Hybris including custom extensions can access it.

Properties defined in this file will take more precedence than properties defined in any other properties file.

Priority in properties file


Remember that the precedence of properties files is as below

propertyfile_precedence

We can find all the properties defined in any of the above location in the HAC

Login to HAC and go to Platform/configuration

config_properties_list

We can search specific key in the search box.

We can also change the values of the keys dynamically and add the new key value pair as well.

We are changing abstractorder.taxFreeEntrySupport value from false to true as below

config_properties_change

Note:


Changing values or adding new key value pairs in HAC directly will be lost after restarting the Server.

So it’s essential to modify the values or add the key value pairs inside the properties file so that it remains forever.

About the Author

Karibasappa G C (KB)
Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on