cancel
Showing results for 
Search instead for 
Did you mean: 

AddOn for OCC Web Services spring context

Former Member
0 Kudos

Hello,

Following this tutorial you are able to create a new addon and install it on the ycommercewebservices extension.

I wanted to ask you if the spring context of a controller from this addon is different from the ones from ycommercewebservices and what should I do to get all the @Resources available in my controller.

I'll give an example from the tutorial itself have in the ExtendedCartController facades which can be injected with @Resource(name = "checkoutFacade") private CheckoutFacade checkoutFacade; but if I do the same as in de.hybris.platform.ycommercewebservices.v1.controller.CartController @Resource(name = "addressValidator") private Validator addressValidator; I get the error Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'addressValidator' is defined .

Do you have any tips on what I'm doing wrong or what I should add more?

Former Member
0 Kudos

Did you get a web module for the occaddon?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alecs,

Accoring to the tutorial, the addon web context should be added to the commerce webservice webcontext. Did you put the following in your project.properties.template ?

 ycommercewebservices.additionalWebSpringConfigs.occaddon=classpath:/occaddon/web/spring/occaddon-web-spring.xml


Thanks,

Amel.

Former Member
0 Kudos

Hi Amel,

Yes I've added the additionalWebSpringConfigs. This way my controller got picked by the context:component-scan tag and I got access to the checkoutFacade.

The problem is that I don't get access to all those beans from ycommercewebservices context.

Tnanks, Alecs

Answers (1)

Answers (1)

former_member747843
Active Participant
0 Kudos

Hi

karnwal_ankit
Explorer
0 Kudos

Hi Kinga, I am also facing the same issue faced by Alecs and have the above 2 configurations in place, but still getting no bean defined exception.