활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi All,
@Service, @Reference, @Properties, @component.
Have encountered the above four at various places, but was not able to get a good understanding on the same.
Can some one please explain these, with short snippet of code.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Just to explain in simple terms,
@component - to mention the class as a component which will follow the component lifecycle of activate and deactivate
@service - to mention that the OSGi component is a Service which can be exposed to others to use this service
@properties - to mention the properties of a service which can be configured
@reference - to create a dependency reference of another service within a service
조회 수
답글
좋아요 수
Here is where you can find theory on these annotations:
http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html
Read these community articles - they are used in them and you can build services that use them:
1 - https://helpx.adobe.com/experience-manager/using/first-osgi.html (uses @Service and @Component)
2 - https://helpx.adobe.com/experience-manager/using/datasourcepool.html (uses the @Reference annotation to inject a DataSourcePool into the new AEM service)
3 - https://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html (uses the @Properties annotation)
4 - https://helpx.adobe.com/experience-manager/using/damhandler.html (another example of using the @Properties annotation)
조회 수
답글
좋아요 수
Just to explain in simple terms,
@component - to mention the class as a component which will follow the component lifecycle of activate and deactivate
@service - to mention that the OSGi component is a Service which can be exposed to others to use this service
@properties - to mention the properties of a service which can be configured
@reference - to create a dependency reference of another service within a service
조회 수
답글
좋아요 수
조회 수
Likes
답글
조회 수
Likes
답글