@Reference
Hi
can we inject 1 component into another using @reference in aem ?
Hi
can we inject 1 component into another using @reference in aem ?
Hi,
As per Apache Felix documentation Apache Felix - SCR Annotations @Reference annotation is defined as below
The
@Referenceannotation defines references to other services made available to the component by the Service Component Runtime.
@reference is used to refer any service registered in your osgi console. So until you declare your class as a service , if you try to refer it using @reference annotation it is going to return you null.
Let us know your use case then community can provide more details
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.