What are different kind of property files in Hybris.

Hybris provides a flexible way to manage properties for your project. You can configure as many as properties as you want in your project.

  • project. properties : This is actually a extension level property file. The properties defined here are available only for the extension, it belongs to. You should define the properties,  which are to be used only in this extension. Hybris provides a property file for each extension by default. The value for a given property is based on the experience and convenience. For example, the URL for HAC.
  • Local.properties : We have another file called local.properties. This is available per tenant for the overall application. This file is used to define modify the values given in extension specific project.properties file. So it will basically overrides the project.properties file value. For example, we can give, database connectivity parameters in this file.
  • We should always use local.property file to customize the behavior of hybris. As any migration or upgrade will not effect, the values to go to default ones.
  • We also have localization property files, to manage the internationalization of project.
  • We need to restart the server to make an effect of change in any property value. Build is not necessary.
  • We can use the properties even in spring managed beans. We can pass them as a property of a bean.
<bean class="StockService">
  <property name="defaultStocklevel" value="${default.stock.level}"/>

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s