Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Using Spring Annotations in a Custom Service Component

Avatar

Avatar
Level 1
timrc116
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
timrc116
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
timrc116
Level 1

15-02-2011

I am trying to use Spring Annotations in a custom component, but my beans with annotations are not found.  I am define a service factory class in my component.xml wich extends com.adobe.idp.dsc.component.support.AbstractServiceInstanceFactory.

<component xmlns="http://adobe.com/idp/dsc/component/document">

   ...

  <service-factory-class>

     ....spring.SpringServiceFactory

  </service-factory-class>

  <lifecycle-class>

  </lifecycle-class>

  <search-order>

     PARENT_LAST

  </search-order></component>

In the getBeanFactory method I create an org.springframework.context.annotation.AnnotationConfigApplicationContext and set the base package and scan.  The problem is none of my bean are in the the returned  bean factory.  I have tried setting the classloader to the ServiceConfiguration classloader but that did not help either.

Does anyone know to do this?

Thanks

-Timc