cancel
Showing results for 
Search instead for 
Did you mean: 

How to use properties of local.properties in composition handler in datahub

Former Member
0 Kudos

Hi All,

Is there any way to use property which is defined in local.properties of datahub in compostion handler o grouping handler? for example if we define property like below datahub.category = abc

how to use datahub.category in handler class ??

Regards, Rasika

View Entire Topic
VinayKumarS
Active Contributor
0 Kudos

Add the property and value into the local.properties and inject the value using spring xml file.

For example we have datahub clean up properties defined in local.properties. which are injected in spring bean class.. sample given below.

 -<bean class="com.hybris.datahub.cleanup.jdbc.AbstractJdbcCleanupService" abstract="true" id="abstractJdbcCleanupService">
 
 <property name="jdbcTemplate" ref="jdbcTemplate"/>
 
 <property name="namedParameterJdbcTemplate" ref="namedParameterJdbcTemplate"/>
 
 <property name="dataSourceMetaData" ref="dataSourceMetaData"/>
 
 <property name="maxUpdateBatchSize" value="${datahub.sql.maxUpdateBatchSize}"/>
 
 <property name="platformTransactionManager" ref="transactionManager"/>
 
 </bean>

Similarly you can do the same.