cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Spring Bean ID

davidsun
Champ in-the-making
Champ in-the-making
I know Alfresco already registered spring bean in the context, such as nodeService, the problem is that when I created a AMP SDK 2.0 project, how can I get those Spring Beans Ids and then injected into my service?

Before in AMP SDK 1.1.1, I usually search all *context*.xml file with grep to find them, but in AMP SDK 2.0, this way seems does not work.

Thank you!

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

this has nothing to do with the SDK, but with the Alfresco version. Starting with Alfresco 5, almost all Spring context files are packaged in the JAR file of the Alfresco component they belong to. So you'd have to open the alfresco-repository.jar to look for the Spring context files that originate in that project. If I remember correctly, there should also be special config-scope ZIP artifacts that contain the only configuration files, but they are usually not included as dependencies in Maven projects.

Regards
Axel