Page 1 of 1

Changes in BLC framework from 2.0.1->2.2.0

Posted: Mon Mar 11, 2013 9:43 am
by staleks
recently I've started to migrate BLC from 2.0.1-GA -> 2.2.0-GA.

I have a problem with following file:
/broadleaf-framework/src/main/resources/bl-framework-applicationContext.xml

You will notice that from version 2.0.1-GA to 2.2.0.GA following has been changed:

Code: Select all

<context:component-scan base-package="org.broadleafcommerce.profile">
     <context:exclude-filter expression="org.broadleafcommerce.profile.web.*"  type="regex" />
</context:component-scan>


to:

Code: Select all

<context:component-scan base-package="org.broadleafcommerce.core">
<!--          <context:exclude-filter type="regex" expression="org.broadleafcommerce.core.web.*"/> -->
</context:component-scan>


Now we have our custom EndPoint's that has to be on designated URL's, and later in "our" applicationContext we exclude following beans:

Code: Select all

<context:component-scan base-package="org.broadleafcommerce.core.web">
     <context:exclude-filter type="regex" expression="org.broadleafcommerce.core.web.api.endpoint.order.OrderHistoryEndpoint" />
     <context:exclude-filter type="regex" expression="org.broadleafcommerce.core.web.api.endpoint.order.CartEndpoint" />
     <context:exclude-filter type="regex" expression="org.broadleafcommerce.core.web.api.endpoint.checkout.CheckoutEndpoint" />
     <context:exclude-filter type="regex" expression="org.broadleafcommerce.core.web.api.endpoint.catalog.CatalogEndpoint"/>
</context:component-scan>

and add our own implementations.

Can you please explain me what was decision to do so, and maybe some good tip how to overcome this situation since we want to keep our beans but they should process designated URL's?

Thank You

Re: Changes in BLC framework from 2.0.1->2.2.0

Posted: Tue Mar 12, 2013 8:31 am
by jefffischer
I have created the following JIRA issue to track this item:

http://jira.broadleafcommerce.org/browse/BLC-851

I don't have an exact timeline on when this will be addressed, but it will be part of 2.2.1.

In the meantime, you should be able to easily workaround this issue by declaring your endpoint beans in xml, since the xml declaration will override the autowiring. You won't have to re-declare any autowired member variables in your endpoints, as spring will pick these up still. Something like this should suffice:

<bean id="blRestOrderHistoryEndpoint" class="your.class.name"/>

It looks like the bean ids you'll need to override are: blRestOrderHistoryEndpoint, blRestCartEndpoint, blRestCheckoutEndpoint, blRestCatalogEndpoint.