Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Persistence Handlers should be bean refs for overriding #91

Closed
phillipuniverse opened this issue Jun 15, 2013 · 0 comments
Closed

Comments

@phillipuniverse
Copy link
Contributor

Rather than defining custom persistence handlers like this:

    <bean id="blCustomPersistenceHandlers" class="org.springframework.beans.factory.config.ListFactoryBean" scope="prototype">
        <property name="sourceList">
            <list>
                <bean class="org.broadleafcommerce.admin.server.service.handler.CategoryCustomPersistenceHandler"/>
                <bean class="org.broadleafcommerce.admin.server.service.handler.CustomerPasswordCustomPersistenceHandler"/>                
               ...
            </list>
        </property>
    </bean>

It should instead be defined like this:

    <bean id="blCustomPersistenceHandlers" class="org.springframework.beans.factory.config.ListFactoryBean" scope="prototype">
        <property name="sourceList">
            <list>
                <ref bean="blCategoryCustomPersistenceHandler" />
                <ref bean="blCustomerPasswordCustomPersistenceHandler" />
               ...
            </list>
        </property>
    </bean>

This way, someone can override it with their own by just adding:

<bean id="blCategoryCustomPersistenceHandler" class="com.mycompany.admin.service.handler.MyCategoryCPH" />
@ghost ghost assigned phillipuniverse Nov 7, 2013
phillipuniverse added a commit that referenced this issue Nov 7, 2013
phillipuniverse added a commit that referenced this issue Jul 18, 2017
nithin100 pushed a commit to nithin100/BroadleafCommerce that referenced this issue Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant